Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
code health: don't mix FAILURE and -1 in get_spaceno_by_name()
Technically we should return FAILURE (not -1) from the changed function in case of a failure. FAILURE is -1 in fact and it unlikely will be changed, but the only formal guarantee we have is that FAILURE is a negative value. Cited from [1]: | typedef enum { | SUCCESS = 0, | FAILURE = -1, /* this MUST stay a negative number, or it may affect functions! */ | } ZEND_RESULT_CODE; No behaviour actually changed in this commit. It is the follow up for 5647d24 ('Fix select() by space_no and index_name'), where we initially set eyes on this point. [1]: https://github.com/php/php-src/blob/4903f7c5fde11a115f659ec54a1d0ede6fd7232c/Zend/zend_types.h#L53-L56 Follows up #42.
- Loading branch information