summaryrefslogtreecommitdiffstats
path: root/lib
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
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')
-rw-r--r--lib/libc/stdlib/strtol.c4
-rw-r--r--lib/libc/stdlib/strtoll.c4
-rw-r--r--lib/libc/stdlib/strtoul.c4
-rw-r--r--lib/libc/stdlib/strtoull.c4
4 files changed, 8 insertions, 8 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))
diff --git a/lib/libc/stdlib/strtoll.c b/lib/libc/stdlib/strtoll.c
index 08d4f05..f830608 100644
--- a/lib/libc/stdlib/strtoll.c
+++ b/lib/libc/stdlib/strtoll.c
@@ -90,7 +90,7 @@ strtoll(nptr, endptr, base)
}
if (base == 0)
base = c == '0' ? 8 : 10;
- any = 0;
+ acc = any = 0;
if (base < 2 || base > 36)
goto noconv;
@@ -116,7 +116,7 @@ strtoll(nptr, endptr, base)
: LLONG_MAX;
cutlim = cutoff % base;
cutoff /= base;
- for (acc = 0; ; c = *s++) {
+ for ( ; ; c = *s++) {
if (!isascii(c))
break;
if (isdigit(c))
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))
diff --git a/lib/libc/stdlib/strtoull.c b/lib/libc/stdlib/strtoull.c
index ac0935e..d694cfd 100644
--- a/lib/libc/stdlib/strtoull.c
+++ b/lib/libc/stdlib/strtoull.c
@@ -88,13 +88,13 @@ strtoull(nptr, endptr, base)
}
if (base == 0)
base = c == '0' ? 8 : 10;
- any = 0;
+ acc = any = 0;
if (base < 2 || base > 36)
goto noconv;
cutoff = ULLONG_MAX / base;
cutlim = ULLONG_MAX % base;
- for (acc = 0; ; c = *s++) {
+ for ( ; ; c = *s++) {
if (!isascii(c))
break;
if (isdigit(c))
OpenPOWER on IntegriCloud