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.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/lib/libc/stdlib/strtoul.c b/src/lib/libc/stdlib/strtoul.c
index 7d31ce79fb..1faa0abbd0 100644
--- a/src/lib/libc/stdlib/strtoul.c
+++ b/src/lib/libc/stdlib/strtoul.c
@@ -28,7 +28,7 @@
28 */ 28 */
29 29
30#if defined(LIBC_SCCS) && !defined(lint) 30#if defined(LIBC_SCCS) && !defined(lint)
31static char *rcsid = "$OpenBSD: strtoul.c,v 1.5 2003/06/02 20:18:38 millert Exp $"; 31static char *rcsid = "$OpenBSD: strtoul.c,v 1.6 2005/03/30 18:51:49 pat Exp $";
32#endif /* LIBC_SCCS and not lint */ 32#endif /* LIBC_SCCS and not lint */
33 33
34#include <ctype.h> 34#include <ctype.h>
@@ -43,15 +43,12 @@ static char *rcsid = "$OpenBSD: strtoul.c,v 1.5 2003/06/02 20:18:38 millert Exp
43 * alphabets and digits are each contiguous. 43 * alphabets and digits are each contiguous.
44 */ 44 */
45unsigned long 45unsigned long
46strtoul(nptr, endptr, base) 46strtoul(const char *nptr, char **endptr, int base)
47 const char *nptr;
48 char **endptr;
49 register int base;
50{ 47{
51 register const char *s; 48 const char *s;
52 register unsigned long acc, cutoff; 49 unsigned long acc, cutoff;
53 register int c; 50 int c;
54 register int neg, any, cutlim; 51 int neg, any, cutlim;
55 52
56 /* 53 /*
57 * See strtol for comments as to the logic used. 54 * See strtol for comments as to the logic used.