diff options
| author | The Android Open Source Project <initial-contribution@android.com> | 2010-05-03 15:33:05 -0700 |
|---|---|---|
| committer | The Android Open Source Project <initial-contribution@android.com> | 2010-05-03 15:33:05 -0700 |
| commit | f450fa5f991af3c0814f96265cb3b2aafdce2309 (patch) | |
| tree | 1f0e549863606fb8e11215061ad5dde0f37b50cd /libc/stdlib/strtoumax.c | |
| parent | 5ef5272be985dfdeafa86077c306f6b64d334240 (diff) | |
| parent | 0be7eda75a14815aaa3e5cd5d5d4e5d25dc35d1c (diff) | |
| download | bionic-f450fa5f991af3c0814f96265cb3b2aafdce2309.zip bionic-f450fa5f991af3c0814f96265cb3b2aafdce2309.tar.gz bionic-f450fa5f991af3c0814f96265cb3b2aafdce2309.tar.bz2 | |
merge from open-source master
Change-Id: If02d33af51017dbd85e91c79ac2e848eda6cf253
Diffstat (limited to 'libc/stdlib/strtoumax.c')
| -rw-r--r-- | libc/stdlib/strtoumax.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libc/stdlib/strtoumax.c b/libc/stdlib/strtoumax.c index ec45377..e1ff623 100644 --- a/libc/stdlib/strtoumax.c +++ b/libc/stdlib/strtoumax.c @@ -57,7 +57,7 @@ strtoumax(const char *nptr, char **endptr, int base) if (c == '-') { neg = 1; c = *s++; - } else { + } else { neg = 0; if (c == '+') c = *s++; @@ -76,7 +76,7 @@ strtoumax(const char *nptr, char **endptr, int base) case x: cutoff = UINTMAX_MAX / x; \ cutlim = UINTMAX_MAX % x; \ break - + switch (base) { CASE_BASE(8); CASE_BASE(10); @@ -85,7 +85,7 @@ strtoumax(const char *nptr, char **endptr, int base) cutoff = UINTMAX_MAX / base; cutlim = UINTMAX_MAX % base; } - + for (acc = 0, any = 0;; c = (unsigned char) *s++) { if (isdigit(c)) c -= '0'; |
