]> granicus.if.org Git - php/commitdiff
Reduce variable scope
authorAnatol Belski <ab@php.net>
Thu, 15 Feb 2018 20:34:55 +0000 (21:34 +0100)
committerAnatol Belski <ab@php.net>
Thu, 15 Feb 2018 20:34:55 +0000 (21:34 +0100)
ext/intl/collator/collator_is_numeric.c

index e3535e7d4b96fe9cf7217938a436cfb9a24ca240..c60724bcfa16e855cd4ecdcd111c390b42fa5663 100644 (file)
@@ -25,7 +25,6 @@ static double collator_u_strtod(const UChar *nptr, UChar **endptr) /* {{{ */
        const UChar *u = nptr, *nstart;
        UChar c = *u;
        int any = 0;
-       ALLOCA_FLAG(use_heap);
 
        while (u_isspace(c)) {
                c = *++u;
@@ -72,6 +71,7 @@ static double collator_u_strtod(const UChar *nptr, UChar **endptr) /* {{{ */
                char buf[64], *numbuf, *bufpos;
                size_t length = u - nstart;
                double value;
+               ALLOCA_FLAG(use_heap);
 
                if (length < sizeof(buf)) {
                        numbuf = buf;