mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
Clean up unnecessary ternary expressions and simplify some returns
- Simplify conditions - Use ZEND_HASH_APPLY_* instead of hard-coded booleans - Use ZEND_NORMALIZE_BOOL - Drop sign in favor of ZEND_NORMALIZE_BOOL
This commit is contained in:
parent
6c16f9b69c
commit
cdd8368d6f
26 changed files with 39 additions and 63 deletions
|
@ -50,7 +50,7 @@ zend_string
|
|||
int index, signch;
|
||||
|
||||
/* Allocate the string memory. */
|
||||
signch = ( num->n_sign == PLUS ? 0 : 1 ); /* Number of sign chars. */
|
||||
signch = num->n_sign != PLUS; /* Number of sign chars. */
|
||||
if (scale > 0)
|
||||
str = zend_string_alloc(num->n_len + scale + signch + 1, 0);
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue