File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,9 @@ static HashTable *registered_zend_ini_directives;
30
30
#define NO_VALUE_PLAINTEXT "no value"
31
31
#define NO_VALUE_HTML "<i>no value</i>"
32
32
33
- #define ZEND_IS_WHITESPACE (c ) (((c) == ' ') || ((c) == '\t') || ((c) == '\n') || ((c) == '\r') || ((c) == '\v') || ((c) == '\f'))
33
+ static inline bool zend_is_whitespace (char c ) {
34
+ return c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '\v' || c == '\f' ;
35
+ }
34
36
35
37
/*
36
38
* hash_apply functions
@@ -545,7 +547,8 @@ ZEND_API zend_long zend_ini_parse_quantity(zend_string *value, zend_string **err
545
547
size_t str_len = ZSTR_LEN (value );
546
548
547
549
/* Ignore trailing whitespace */
548
- while (str_len && ZEND_IS_WHITESPACE (str [str_len - 1 ])) -- str_len ;
550
+ while (str_len && zend_is_whitespace (str [str_len - 1 ])) -- str_len ;
551
+
549
552
if (!str_len ) {
550
553
* errstr = NULL ;
551
554
return 0 ;
@@ -565,7 +568,7 @@ ZEND_API zend_long zend_ini_parse_quantity(zend_string *value, zend_string **err
565
568
}
566
569
567
570
/* Allow for whitespace between integer portion and any suffix character */
568
- while (ZEND_IS_WHITESPACE (* digits_end )) ++ digits_end ;
571
+ while (zend_is_whitespace (* digits_end )) ++ digits_end ;
569
572
570
573
/* No exponent suffix. */
571
574
if (!* digits_end ) {
You can’t perform that action at this time.
0 commit comments