diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-07-12 05:17:34 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-07-12 05:17:34 +0000 |
commit | 937c9a0f84db15a0a64ed0419a42da3a34d96cde (patch) | |
tree | b6b3bfb6f6bbc506426154fc8294316054abb45f /usr.bin/id | |
parent | 4e5dd980fd1238d635621b9bba7d99533aababd6 (diff) |
first pass at a -Wall cleanup
Diffstat (limited to 'usr.bin/id')
-rw-r--r-- | usr.bin/id/id.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/id/id.c b/usr.bin/id/id.c index 705e72e6883..553f65acd7c 100644 --- a/usr.bin/id/id.c +++ b/usr.bin/id/id.c @@ -1,4 +1,4 @@ -/* $OpenBSD: id.c,v 1.8 1999/08/18 12:23:01 aaron Exp $ */ +/* $OpenBSD: id.c,v 1.9 2001/07/12 05:17:11 deraadt Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -41,7 +41,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "@(#)id.c 8.3 (Berkeley) 4/28/95";*/ -static char rcsid[] = "$OpenBSD: id.c,v 1.8 1999/08/18 12:23:01 aaron Exp $"; +static char rcsid[] = "$OpenBSD: id.c,v 1.9 2001/07/12 05:17:11 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -172,16 +172,18 @@ pretty(pw) else (void)printf("uid\t%u\n", rid); - if ((eid = geteuid()) != rid) + if ((eid = geteuid()) != rid) { if ((pw = getpwuid(eid))) (void)printf("euid\t%s\n", pw->pw_name); else (void)printf("euid\t%u\n", eid); - if ((rid = getgid()) != (eid = getegid())) + } + if ((rid = getgid()) != (eid = getegid())) { if ((gr = getgrgid(rid))) (void)printf("rgid\t%s\n", gr->gr_name); else (void)printf("rgid\t%u\n", rid); + } (void)printf("groups\t"); group(NULL, 1); } |