From 72f3169fcd3f79c0b793c530ec3080002113fab0 Mon Sep 17 00:00:00 2001 From: millert Date: Mon, 16 Sep 1996 19:01:08 +0000 Subject: [PATCH] uid_t is now a u_int32_t, treat it as such. --- lib/libc/gen/getpwent.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index 8076fdb6e62..728c8f3a6f7 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -33,7 +33,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getpwent.c,v 1.5 1996/09/15 10:09:11 tholo Exp $"; +static char rcsid[] = "$OpenBSD: getpwent.c,v 1.6 1996/09/16 19:01:08 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -643,12 +643,13 @@ struct passwd * getpwuid(uid_t uid) #else getpwuid(uid) - int uid; + uid_t uid; #endif { DBT key; char bf[sizeof(_pw_keynum) + 1]; - int keyuid, rval; + uid_t keyuid; + int rval; if (!_pw_db && !__initdb()) return((struct passwd *)NULL); @@ -664,7 +665,7 @@ getpwuid(uid) int s = -1; const char *host, *user, *dom; - sprintf(uidbuf, "%d", uid); + sprintf(uidbuf, "%u", uid); for(_pw_keynum=1; _pw_keynum; _pw_keynum++) { bf[0] = _PW_KEYBYNUM; bcopy((char *)&_pw_keynum, bf + 1, sizeof(_pw_keynum)); -- 2.20.1