diff options
author | millert <> | 2002-02-19 19:39:38 +0000 |
---|---|---|
committer | millert <> | 2002-02-19 19:39:38 +0000 |
commit | 0be1f7d80eff8e3e86b037958be3ab5217ce9b59 (patch) | |
tree | 9e6b3b31919b853c473f13c35c4878ac3aef84ab /src/lib/libc/crypt/bcrypt.c | |
parent | 97ec74faebf84f0ecbbf3706ec05647d012003c9 (diff) | |
download | openbsd-0be1f7d80eff8e3e86b037958be3ab5217ce9b59.tar.gz openbsd-0be1f7d80eff8e3e86b037958be3ab5217ce9b59.tar.bz2 openbsd-0be1f7d80eff8e3e86b037958be3ab5217ce9b59.zip |
We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.
Diffstat (limited to 'src/lib/libc/crypt/bcrypt.c')
-rw-r--r-- | src/lib/libc/crypt/bcrypt.c | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/src/lib/libc/crypt/bcrypt.c b/src/lib/libc/crypt/bcrypt.c index f3ea849f00..dec0093dd8 100644 --- a/src/lib/libc/crypt/bcrypt.c +++ b/src/lib/libc/crypt/bcrypt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bcrypt.c,v 1.15 2002/02/16 21:27:21 millert Exp $ */ | 1 | /* $OpenBSD: bcrypt.c,v 1.16 2002/02/19 19:39:36 millert Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> | 4 | * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> |
@@ -97,16 +97,8 @@ const static u_int8_t index_64[128] = | |||
97 | }; | 97 | }; |
98 | #define CHAR64(c) ( (c) > 127 ? 255 : index_64[(c)]) | 98 | #define CHAR64(c) ( (c) > 127 ? 255 : index_64[(c)]) |
99 | 99 | ||
100 | #ifdef __STDC__ | ||
101 | static void | 100 | static void |
102 | decode_base64(u_int8_t *buffer, u_int16_t len, u_int8_t *data) | 101 | decode_base64(u_int8_t *buffer, u_int16_t len, u_int8_t *data) |
103 | #else | ||
104 | static void | ||
105 | decode_base64(buffer, len, data) | ||
106 | u_int8_t *buffer; | ||
107 | u_int16_t len; | ||
108 | u_int8_t *data; | ||
109 | #endif | ||
110 | { | 102 | { |
111 | u_int8_t *bp = buffer; | 103 | u_int8_t *bp = buffer; |
112 | u_int8_t *p = data; | 104 | u_int8_t *p = data; |
@@ -140,17 +132,8 @@ decode_base64(buffer, len, data) | |||
140 | } | 132 | } |
141 | } | 133 | } |
142 | 134 | ||
143 | #ifdef __STDC__ | ||
144 | static void | 135 | static void |
145 | encode_salt(char *salt, u_int8_t *csalt, u_int16_t clen, u_int8_t logr) | 136 | encode_salt(char *salt, u_int8_t *csalt, u_int16_t clen, u_int8_t logr) |
146 | #else | ||
147 | static void | ||
148 | encode_salt(salt, csalt, clen, logr) | ||
149 | char *salt; | ||
150 | u_int8_t *csalt; | ||
151 | u_int16_t clen; | ||
152 | u_int8_t logr; | ||
153 | #endif | ||
154 | { | 137 | { |
155 | salt[0] = '$'; | 138 | salt[0] = '$'; |
156 | salt[1] = BCRYPT_VERSION; | 139 | salt[1] = BCRYPT_VERSION; |
@@ -166,14 +149,8 @@ encode_salt(salt, csalt, clen, logr) | |||
166 | seems sensible. | 149 | seems sensible. |
167 | */ | 150 | */ |
168 | 151 | ||
169 | #ifdef __STDC__ | ||
170 | char * | 152 | char * |
171 | bcrypt_gensalt(u_int8_t log_rounds) | 153 | bcrypt_gensalt(u_int8_t log_rounds) |
172 | #else | ||
173 | char * | ||
174 | bcrypt_gensalt(log_rounds) | ||
175 | u_int8_t log_rounds; | ||
176 | #endif | ||
177 | { | 154 | { |
178 | u_int8_t csalt[BCRYPT_MAXSALT]; | 155 | u_int8_t csalt[BCRYPT_MAXSALT]; |
179 | u_int16_t i; | 156 | u_int16_t i; |
@@ -296,16 +273,8 @@ bcrypt(key, salt) | |||
296 | return encrypted; | 273 | return encrypted; |
297 | } | 274 | } |
298 | 275 | ||
299 | #ifdef __STDC__ | ||
300 | static void | 276 | static void |
301 | encode_base64(u_int8_t *buffer, u_int8_t *data, u_int16_t len) | 277 | encode_base64(u_int8_t *buffer, u_int8_t *data, u_int16_t len) |
302 | #else | ||
303 | static void | ||
304 | encode_base64(buffer, data, len) | ||
305 | u_int8_t *buffer; | ||
306 | u_int8_t *data; | ||
307 | u_int16_t len; | ||
308 | #endif | ||
309 | { | 278 | { |
310 | u_int8_t *bp = buffer; | 279 | u_int8_t *bp = buffer; |
311 | u_int8_t *p = data; | 280 | u_int8_t *p = data; |