From cdd8368d6f3f000a2e30a6be9976c5539f10fe85 Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Sun, 19 Aug 2018 01:32:00 -0300 Subject: 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 --- ext/bcmath/libbcmath/src/num2str.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/bcmath/libbcmath/src/num2str.c') 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 -- cgit v1.2.1