From 48c9c31dbbf62ba7576da3b6db23db97fa9c1f2b Mon Sep 17 00:00:00 2001 From: ache Date: Tue, 4 Sep 2001 17:12:15 +0000 Subject: 'acc' is not initialized in one hypotetical case, fix it --- lib/libc/stdlib/strtol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libc/stdlib/strtol.c') 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)) -- cgit v1.1