summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2003-08-07 00:28:45 +0000
committerderaadt <deraadt@openbsd.org>2003-08-07 00:28:45 +0000
commitd95d3dc4ebebfb6d329b7a64504958439148c232 (patch)
treeb84d4c461e853c64d48fa2207a4cf5c0cd918a10 /lib/libc
parenttypo (diff)
downloadwireguard-openbsd-d95d3dc4ebebfb6d329b7a64504958439148c232.tar.xz
wireguard-openbsd-d95d3dc4ebebfb6d329b7a64504958439148c232.zip
ansi
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/crypt/bcrypt.c11
-rw-r--r--lib/libc/crypt/md5crypt.c15
2 files changed, 8 insertions, 18 deletions
diff --git a/lib/libc/crypt/bcrypt.c b/lib/libc/crypt/bcrypt.c
index 35959d1fc44..95251db1cdb 100644
--- a/lib/libc/crypt/bcrypt.c
+++ b/lib/libc/crypt/bcrypt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bcrypt.c,v 1.17 2003/06/25 21:16:47 deraadt Exp $ */
+/* $OpenBSD: bcrypt.c,v 1.18 2003/08/07 00:28:45 deraadt Exp $ */
/*
* Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
@@ -79,8 +79,7 @@ static char error[] = ":";
const static u_int8_t Base64Code[] =
"./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
-const static u_int8_t index_64[128] =
-{
+const static u_int8_t index_64[128] = {
255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
@@ -172,12 +171,8 @@ bcrypt_gensalt(u_int8_t log_rounds)
/* We handle $Vers$log2(NumRounds)$salt+passwd$
i.e. $2$04$iwouldntknowwhattosayetKdJ6iFtacBqJdKe6aW7ou */
-char *bcrypt(const char *key, const char *salt);
-
char *
-bcrypt(key, salt)
- const char *key;
- const char *salt;
+bcrypt(const char *key, const char *salt)
{
blf_ctx state;
u_int32_t rounds, i, k;
diff --git a/lib/libc/crypt/md5crypt.c b/lib/libc/crypt/md5crypt.c
index fb09b375e60..97717e68d54 100644
--- a/lib/libc/crypt/md5crypt.c
+++ b/lib/libc/crypt/md5crypt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: md5crypt.c,v 1.12 2003/06/25 21:16:47 deraadt Exp $ */
+/* $OpenBSD: md5crypt.c,v 1.13 2003/08/07 00:30:21 deraadt Exp $ */
/*
* ----------------------------------------------------------------------------
@@ -13,7 +13,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: md5crypt.c,v 1.12 2003/06/25 21:16:47 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: md5crypt.c,v 1.13 2003/08/07 00:30:21 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <unistd.h>
@@ -28,10 +28,7 @@ static unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */
static void to64(char *, u_int32_t, int);
static void
-to64(s, v, n)
- char *s;
- u_int32_t v;
- int n;
+to64(char *s, u_int32_t v, int n)
{
while (--n >= 0) {
*s++ = itoa64[v&0x3f];
@@ -48,9 +45,7 @@ to64(s, v, n)
char *md5crypt(const char *pw, const char *salt);
char *
-md5crypt(pw, salt)
- register const char *pw;
- register const char *salt;
+md5crypt(const char *pw, const char *salt)
{
/*
* This string is magic for this algorithm. Having
@@ -151,7 +146,7 @@ md5crypt(pw, salt)
*p = '\0';
/* Don't leave anything around in vm they could use. */
- memset(final,0,sizeof final);
+ memset(final, 0, sizeof final);
return passwd;
}