summaryrefslogtreecommitdiff
path: root/ext/bcmath/libbcmath/src
diff options
context:
space:
mode:
authorGabriel Caruso <carusogabriel34@gmail.com>2018-08-19 01:32:00 -0300
committerPeter Kokot <peterkokot@gmail.com>2018-12-03 01:22:14 +0100
commitcdd8368d6f3f000a2e30a6be9976c5539f10fe85 (patch)
tree8f680d0c1fb552fdcbdbf3d49427c811fa789bf9 /ext/bcmath/libbcmath/src
parent6c16f9b69c1951392d5d0ac89d3fbd2b318af118 (diff)
downloadphp-git-cdd8368d6f3f000a2e30a6be9976c5539f10fe85.tar.gz
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
Diffstat (limited to 'ext/bcmath/libbcmath/src')
-rw-r--r--ext/bcmath/libbcmath/src/num2str.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/bcmath/libbcmath/src/num2str.c b/ext/bcmath/libbcmath/src/num2str.c
index 742d3278e7..93026815be 100644
--- a/ext/bcmath/libbcmath/src/num2str.c
+++ b/ext/bcmath/libbcmath/src/num2str.c
@@ -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