From: Xinchen Hui Date: Sun, 8 May 2016 05:04:31 +0000 (-0700) Subject: Remove unnecessary strlen check X-Git-Tag: php-7.1.0alpha1~175 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b62f7e338d4c771243df9c145761cab34a127880;p=php Remove unnecessary strlen check --- diff --git a/Zend/zend_strtod.c b/Zend/zend_strtod.c index 889a31685c..a524e64aa1 100644 --- a/Zend/zend_strtod.c +++ b/Zend/zend_strtod.c @@ -4416,13 +4416,6 @@ ZEND_API double zend_hex_strtod(const char *str, const char **endptr) int any = 0; double value = 0; - if (s[0] == '\0' || s[1] == '\0') { - if (endptr != NULL) { - *endptr = str; - } - return 0.0; - } - if (*s == '0' && (s[1] == 'x' || s[1] == 'X')) { s += 2; } @@ -4491,13 +4484,6 @@ ZEND_API double zend_bin_strtod(const char *str, const char **endptr) double value = 0; int any = 0; - if (str[0] == '\0' || str[1] == '\0') { - if (endptr != NULL) { - *endptr = str; - } - return 0.0; - } - if ('0' == *s && ('b' == s[1] || 'B' == s[1])) { s += 2; }