diff --git a/src/lib/libc/crypt/bcrypt.c b/src/lib/libc/crypt/bcrypt.c index 35959d1f..95251db1 100644 --- a/src/lib/libc/crypt/bcrypt.c +++ b/src/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 @@ -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/src/lib/libc/crypt/md5crypt.c b/src/lib/libc/crypt/md5crypt.c index fb09b375..97717e68 100644 --- a/src/lib/libc/crypt/md5crypt.c +++ b/src/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 @@ -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; }