summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortedu <>2013-04-17 17:40:35 +0000
committertedu <>2013-04-17 17:40:35 +0000
commit2931c2cee818cf240b3bf21e65038ea457610380 (patch)
tree1bbf3313f1c1a883a49863240ee9cb1481cf58b2 /src
parent67b38865feb6e8af34201cc2291c158d370887bd (diff)
downloadopenbsd-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')
-rw-r--r--src/lib/libc/crypt/crypt2.c5
-rw-r--r--src/lib/libc/stdlib/strtol.c8
-rw-r--r--src/lib/libc/stdlib/strtoul.c4
3 files changed, 10 insertions, 7 deletions
diff --git a/src/lib/libc/crypt/crypt2.c b/src/lib/libc/crypt/crypt2.c
index 63a297e510..f31818ae2b 100644
--- a/src/lib/libc/crypt/crypt2.c
+++ b/src/lib/libc/crypt/crypt2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: crypt2.c,v 1.3 2005/08/08 08:05:33 espie Exp $ */ 1/* $OpenBSD: crypt2.c,v 1.4 2013/04/17 17:40:35 tedu Exp $ */
2 2
3/* 3/*
4 * FreeSec: libcrypt 4 * FreeSec: libcrypt
@@ -59,6 +59,9 @@
59extern const u_char _des_bits8[8]; 59extern const u_char _des_bits8[8];
60extern const u_int32_t _des_bits32[32]; 60extern const u_int32_t _des_bits32[32];
61extern int _des_initialised; 61extern int _des_initialised;
62void _des_init(void);
63void _des_setup_salt(int32_t salt);
64int _des_do_des(u_int32_t , u_int32_t , u_int32_t *, u_int32_t *, int);
62 65
63int 66int
64setkey(const char *key) 67setkey(const char *key)
diff --git a/src/lib/libc/stdlib/strtol.c b/src/lib/libc/stdlib/strtol.c
index 745bc4c2ce..dc2cf8871c 100644
--- a/src/lib/libc/stdlib/strtol.c
+++ b/src/lib/libc/stdlib/strtol.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: strtol.c,v 1.8 2012/11/18 04:13:39 jsing Exp $ */ 1/* $OpenBSD: strtol.c,v 1.9 2013/04/17 17:40:35 tedu Exp $ */
2/*- 2/*-
3 * Copyright (c) 1990 The Regents of the University of California. 3 * Copyright (c) 1990 The Regents of the University of California.
4 * All rights reserved. 4 * All rights reserved.
@@ -54,7 +54,7 @@ strtol(const char *nptr, char **endptr, int base)
54 */ 54 */
55 if (base != 0 && (base < 2 || base > 36)) { 55 if (base != 0 && (base < 2 || base > 36)) {
56 if (endptr != 0) 56 if (endptr != 0)
57 *endptr = nptr; 57 *endptr = (char *)nptr;
58 errno = EINVAL; 58 errno = EINVAL;
59 return 0; 59 return 0;
60 } 60 }
@@ -124,7 +124,7 @@ strtol(const char *nptr, char **endptr, int base)
124 if (any < 0) 124 if (any < 0)
125 continue; 125 continue;
126 if (neg) { 126 if (neg) {
127 if (acc < cutoff || acc == cutoff && c > cutlim) { 127 if (acc < cutoff || (acc == cutoff && c > cutlim)) {
128 any = -1; 128 any = -1;
129 acc = LONG_MIN; 129 acc = LONG_MIN;
130 errno = ERANGE; 130 errno = ERANGE;
@@ -134,7 +134,7 @@ strtol(const char *nptr, char **endptr, int base)
134 acc -= c; 134 acc -= c;
135 } 135 }
136 } else { 136 } else {
137 if (acc > cutoff || acc == cutoff && c > cutlim) { 137 if (acc > cutoff || (acc == cutoff && c > cutlim)) {
138 any = -1; 138 any = -1;
139 acc = LONG_MAX; 139 acc = LONG_MAX;
140 errno = ERANGE; 140 errno = ERANGE;
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;