]> granicus.if.org Git - php/commitdiff
Remove unnecessary strlen check
authorXinchen Hui <laruence@gmail.com>
Sun, 8 May 2016 05:04:31 +0000 (22:04 -0700)
committerXinchen Hui <laruence@gmail.com>
Sun, 8 May 2016 05:04:31 +0000 (22:04 -0700)
Zend/zend_strtod.c

index 889a31685c3f57f8e8192ce39bb6fde81e20ef97..a524e64aa17432a2d205066638aa5fb5b8b51f5b 100644 (file)
@@ -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;
        }