diff options
author | tedu <> | 2013-04-17 17:40:35 +0000 |
---|---|---|
committer | tedu <> | 2013-04-17 17:40:35 +0000 |
commit | 2931c2cee818cf240b3bf21e65038ea457610380 (patch) | |
tree | 1bbf3313f1c1a883a49863240ee9cb1481cf58b2 /src/lib/libc/stdlib/strtoul.c | |
parent | 67b38865feb6e8af34201cc2291c158d370887bd (diff) | |
download | openbsd-2931c2cee818cf240b3bf21e65038ea457610380.tar.gz openbsd-2931c2cee818cf240b3bf21e65038ea457610380.tar.bz2 openbsd-2931c2cee818cf240b3bf21e65038ea457610380.zip |
add some prototypes, casts, includes, parenthesis, and whatnot to
silence some warnings.
Diffstat (limited to 'src/lib/libc/stdlib/strtoul.c')
-rw-r--r-- | src/lib/libc/stdlib/strtoul.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libc/stdlib/strtoul.c b/src/lib/libc/stdlib/strtoul.c index d7dddab778..a236365d2f 100644 --- a/src/lib/libc/stdlib/strtoul.c +++ b/src/lib/libc/stdlib/strtoul.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: strtoul.c,v 1.7 2005/08/08 08:05:37 espie Exp $ */ | 1 | /* $OpenBSD: strtoul.c,v 1.8 2013/04/17 17:40:35 tedu Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1990 Regents of the University of California. | 3 | * Copyright (c) 1990 Regents of the University of California. |
4 | * All rights reserved. | 4 | * All rights reserved. |
@@ -84,7 +84,7 @@ strtoul(const char *nptr, char **endptr, int base) | |||
84 | break; | 84 | break; |
85 | if (any < 0) | 85 | if (any < 0) |
86 | continue; | 86 | continue; |
87 | if (acc > cutoff || acc == cutoff && c > cutlim) { | 87 | if (acc > cutoff || (acc == cutoff && c > cutlim)) { |
88 | any = -1; | 88 | any = -1; |
89 | acc = ULONG_MAX; | 89 | acc = ULONG_MAX; |
90 | errno = ERANGE; | 90 | errno = ERANGE; |