summaryrefslogtreecommitdiff
path: root/Zend/zend_strtod.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_strtod.c')
-rw-r--r--Zend/zend_strtod.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/Zend/zend_strtod.c b/Zend/zend_strtod.c
index 889a31685c..c69a265231 100644
--- a/Zend/zend_strtod.c
+++ b/Zend/zend_strtod.c
@@ -3615,7 +3615,7 @@ rv_alloc(int i)
j = sizeof(ULong);
for(k = 0;
- sizeof(Bigint) - sizeof(ULong) - sizeof(int) + j <= i;
+ sizeof(Bigint) - sizeof(ULong) - sizeof(int) + (size_t)j <= (size_t)i;
j <<= 1)
k++;
r = (int*)Balloc(k);
@@ -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;
}