'acc' is not initialized in one hypotetical case, fix it

This commit is contained in:
ache 2001-09-04 17:12:15 +00:00
parent 021e34d0dd
commit 48c9c31dbb
4 changed files with 8 additions and 8 deletions

View File

@ -89,7 +89,7 @@ strtol(nptr, endptr, base)
} }
if (base == 0) if (base == 0)
base = c == '0' ? 8 : 10; base = c == '0' ? 8 : 10;
any = 0; acc = any = 0;
if (base < 2 || base > 36) if (base < 2 || base > 36)
goto noconv; goto noconv;
@ -114,7 +114,7 @@ strtol(nptr, endptr, base)
: LONG_MAX; : LONG_MAX;
cutlim = cutoff % base; cutlim = cutoff % base;
cutoff /= base; cutoff /= base;
for (acc = 0; ; c = *s++) { for ( ; ; c = *s++) {
if (!isascii(c)) if (!isascii(c))
break; break;
if (isdigit(c)) if (isdigit(c))

View File

@ -90,7 +90,7 @@ strtoll(nptr, endptr, base)
} }
if (base == 0) if (base == 0)
base = c == '0' ? 8 : 10; base = c == '0' ? 8 : 10;
any = 0; acc = any = 0;
if (base < 2 || base > 36) if (base < 2 || base > 36)
goto noconv; goto noconv;
@ -116,7 +116,7 @@ strtoll(nptr, endptr, base)
: LLONG_MAX; : LLONG_MAX;
cutlim = cutoff % base; cutlim = cutoff % base;
cutoff /= base; cutoff /= base;
for (acc = 0; ; c = *s++) { for ( ; ; c = *s++) {
if (!isascii(c)) if (!isascii(c))
break; break;
if (isdigit(c)) if (isdigit(c))

View File

@ -86,13 +86,13 @@ strtoul(nptr, endptr, base)
} }
if (base == 0) if (base == 0)
base = c == '0' ? 8 : 10; base = c == '0' ? 8 : 10;
any = 0; acc = any = 0;
if (base < 2 || base > 36) if (base < 2 || base > 36)
goto noconv; goto noconv;
cutoff = ULONG_MAX / base; cutoff = ULONG_MAX / base;
cutlim = ULONG_MAX % base; cutlim = ULONG_MAX % base;
for (acc = 0; ; c = *s++) { for ( ; ; c = *s++) {
if (!isascii(c)) if (!isascii(c))
break; break;
if (isdigit(c)) if (isdigit(c))

View File

@ -88,13 +88,13 @@ strtoull(nptr, endptr, base)
} }
if (base == 0) if (base == 0)
base = c == '0' ? 8 : 10; base = c == '0' ? 8 : 10;
any = 0; acc = any = 0;
if (base < 2 || base > 36) if (base < 2 || base > 36)
goto noconv; goto noconv;
cutoff = ULLONG_MAX / base; cutoff = ULLONG_MAX / base;
cutlim = ULLONG_MAX % base; cutlim = ULLONG_MAX % base;
for (acc = 0; ; c = *s++) { for ( ; ; c = *s++) {
if (!isascii(c)) if (!isascii(c))
break; break;
if (isdigit(c)) if (isdigit(c))