summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/strtol.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdlib/strtol.c')
-rw-r--r--lib/libc/stdlib/strtol.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdlib/strtol.c b/lib/libc/stdlib/strtol.c
index 99c895c..58a6845 100644
--- a/lib/libc/stdlib/strtol.c
+++ b/lib/libc/stdlib/strtol.c
@@ -89,7 +89,7 @@ strtol(nptr, endptr, base)
}
if (base == 0)
base = c == '0' ? 8 : 10;
- any = 0;
+ acc = any = 0;
if (base < 2 || base > 36)
goto noconv;
@@ -114,7 +114,7 @@ strtol(nptr, endptr, base)
: LONG_MAX;
cutlim = cutoff % base;
cutoff /= base;
- for (acc = 0; ; c = *s++) {
+ for ( ; ; c = *s++) {
if (!isascii(c))
break;
if (isdigit(c))
OpenPOWER on IntegriCloud