summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/strtoul.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/stdlib/strtoul.c')
-rw-r--r--src/lib/libc/stdlib/strtoul.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libc/stdlib/strtoul.c b/src/lib/libc/stdlib/strtoul.c
index 1522bec584..9d45c5cb9e 100644
--- a/src/lib/libc/stdlib/strtoul.c
+++ b/src/lib/libc/stdlib/strtoul.c
@@ -33,7 +33,7 @@
33 33
34#if defined(LIBC_SCCS) && !defined(lint) 34#if defined(LIBC_SCCS) && !defined(lint)
35/*static char *sccsid = "from: @(#)strtoul.c 5.3 (Berkeley) 2/23/91";*/ 35/*static char *sccsid = "from: @(#)strtoul.c 5.3 (Berkeley) 2/23/91";*/
36static char *rcsid = "$Id: strtoul.c,v 1.2 1995/12/21 14:58:38 deraadt Exp $"; 36static char *rcsid = "$Id: strtoul.c,v 1.3 1996/07/27 10:45:25 deraadt Exp $";
37#endif /* LIBC_SCCS and not lint */ 37#endif /* LIBC_SCCS and not lint */
38 38
39#include <ctype.h> 39#include <ctype.h>
@@ -63,7 +63,7 @@ strtoul(nptr, endptr, base)
63 */ 63 */
64 s = nptr; 64 s = nptr;
65 do { 65 do {
66 c = *s++; 66 c = (unsigned char) *s++;
67 } while (isspace(c)); 67 } while (isspace(c));
68 if (c == '-') { 68 if (c == '-') {
69 neg = 1; 69 neg = 1;
@@ -84,7 +84,7 @@ strtoul(nptr, endptr, base)
84 84
85 cutoff = ULONG_MAX / (unsigned long)base; 85 cutoff = ULONG_MAX / (unsigned long)base;
86 cutlim = ULONG_MAX % (unsigned long)base; 86 cutlim = ULONG_MAX % (unsigned long)base;
87 for (acc = 0, any = 0;; c = *s++) { 87 for (acc = 0, any = 0;; c = (unsigned char) *s++) {
88 if (isdigit(c)) 88 if (isdigit(c))
89 c -= '0'; 89 c -= '0';
90 else if (isalpha(c)) 90 else if (isalpha(c))