Deleted Added
full compact
40c40
< "$FreeBSD: head/lib/libc/stdlib/strtoull.c 73152 2001-02-27 13:33:07Z obrien $";
---
> "$FreeBSD: head/lib/libc/stdlib/strtoull.c 82975 2001-09-04 16:39:11Z ache $";
53c53
< * Ignores `locale' stuff. Assumes that the upper and lower case
---
> * Assumes that the upper and lower case
62c62
< register const char *s = nptr;
---
> register const char *s;
65c65
< register unsigned long long qbase, cutoff;
---
> register unsigned long long cutoff;
91,94c91,97
< qbase = (unsigned)base;
< cutoff = (unsigned long long)ULLONG_MAX / qbase;
< cutlim = (unsigned long long)ULLONG_MAX % qbase;
< for (acc = 0, any = 0;; c = *s++) {
---
> any = 0;
> if (base < 2 || base > 36)
> goto noconv;
>
> cutoff = ULLONG_MAX / base;
> cutlim = ULLONG_MAX % base;
> for (acc = 0; ; c = *s++) {
109c112
< acc *= qbase;
---
> acc *= base;
115a119,121
> } else if (!any) {
> noconv:
> errno = EINVAL;
118c124
< if (endptr != 0)
---
> if (endptr != NULL)