diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-03-30 21:06:30 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-03-30 21:06:30 +0000 |
commit | 4aa6eec1f0ddf8475f882089b9d93b976be7f1b1 (patch) | |
tree | 5396f71d9848f4b94af9e49f6903325178dea7f3 | |
parent | a1aec9c4b02c06fc344177e3bf5cad1c6a02bb7c (diff) |
minimal lint happiness, round 1
-rw-r--r-- | usr.bin/passwd/pwd_gensalt.c | 6 | ||||
-rw-r--r-- | usr.bin/passwd/yp_passwd.c | 9 |
2 files changed, 7 insertions, 8 deletions
diff --git a/usr.bin/passwd/pwd_gensalt.c b/usr.bin/passwd/pwd_gensalt.c index 4e442e8c2fa..fe8e1e81a48 100644 --- a/usr.bin/passwd/pwd_gensalt.c +++ b/usr.bin/passwd/pwd_gensalt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pwd_gensalt.c,v 1.22 2004/12/20 15:05:59 moritz Exp $ */ +/* $OpenBSD: pwd_gensalt.c,v 1.23 2006/03/30 21:06:29 deraadt Exp $ */ /* * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> @@ -97,7 +97,7 @@ pwd_gensalt(char *salt, int saltlen, login_cap_t *lc, char type) else if (rounds > 0xffffff) rounds = 0xffffff; salt[0] = _PASSWORD_EFMT1; - to64(&salt[1], (u_int32_t) rounds, 4); + to64(&salt[1], (u_int32_t)rounds, 4); to64(&salt[5], arc4random(), 4); salt[9] = '\0'; } else if (!strcmp(now, "md5")) { @@ -137,6 +137,6 @@ to64(char *s, int32_t v, int n) { while (--n >= 0) { *s++ = itoa64[v&0x3f]; - v >>= 6; + (unsigned)v >>= 6; } } diff --git a/usr.bin/passwd/yp_passwd.c b/usr.bin/passwd/yp_passwd.c index cd58f8c266d..f75f0376643 100644 --- a/usr.bin/passwd/yp_passwd.c +++ b/usr.bin/passwd/yp_passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: yp_passwd.c,v 1.28 2004/07/13 21:09:48 millert Exp $ */ +/* $OpenBSD: yp_passwd.c,v 1.29 2006/03/30 21:06:29 deraadt Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -30,7 +30,7 @@ */ #ifndef lint /*static const char sccsid[] = "from: @(#)yp_passwd.c 1.0 2/2/93";*/ -static const char rcsid[] = "$OpenBSD: yp_passwd.c,v 1.28 2004/07/13 21:09:48 millert Exp $"; +static const char rcsid[] = "$OpenBSD: yp_passwd.c,v 1.29 2006/03/30 21:06:29 deraadt Exp $"; #endif /* not lint */ #ifdef YP @@ -314,14 +314,13 @@ ypgetpwnam(char *nam, int secure) char *val; reason = yp_match(domain, - secure ? "master.passwd.byname" : "passwd.byname", - nam, strlen(nam), &val, &vallen); + secure ? "master.passwd.byname" : "passwd.byname", + nam, strlen(nam), &val, &vallen); switch (reason) { case 0: break; default: return (NULL); - break; } val[vallen] = '\0'; if (__yplin) |