summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/strtoul.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2001-09-04 17:12:15 +0000
committerache <ache@FreeBSD.org>2001-09-04 17:12:15 +0000
commit48c9c31dbbf62ba7576da3b6db23db97fa9c1f2b (patch)
treeaf89eb01ba19a74fc67ffe143502542f730d19e6 /lib/libc/stdlib/strtoul.c
parent021e34d0dd119dceafc520efd526b221a8305a5f (diff)
downloadFreeBSD-src-48c9c31dbbf62ba7576da3b6db23db97fa9c1f2b.zip
FreeBSD-src-48c9c31dbbf62ba7576da3b6db23db97fa9c1f2b.tar.gz
'acc' is not initialized in one hypotetical case, fix it
Diffstat (limited to 'lib/libc/stdlib/strtoul.c')
-rw-r--r--lib/libc/stdlib/strtoul.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdlib/strtoul.c b/lib/libc/stdlib/strtoul.c
index 820c3ab..6afe9d8 100644
--- a/lib/libc/stdlib/strtoul.c
+++ b/lib/libc/stdlib/strtoul.c
@@ -86,13 +86,13 @@ strtoul(nptr, endptr, base)
}
if (base == 0)
base = c == '0' ? 8 : 10;
- any = 0;
+ acc = any = 0;
if (base < 2 || base > 36)
goto noconv;
cutoff = ULONG_MAX / base;
cutlim = ULONG_MAX % base;
- for (acc = 0; ; c = *s++) {
+ for ( ; ; c = *s++) {
if (!isascii(c))
break;
if (isdigit(c))
OpenPOWER on IntegriCloud