diff options
author | billf <billf@FreeBSD.org> | 1999-07-04 17:26:16 +0000 |
---|---|---|
committer | billf <billf@FreeBSD.org> | 1999-07-04 17:26:16 +0000 |
commit | 4822432874e997891c75df8d30dcab4c52d1a9fa (patch) | |
tree | 6a75551fe39c6d09c4b5991bbb0a4f3d685835fe /usr.bin/id/id.c | |
parent | 7c7c72da3801ba6f43e728ff5145b4988674abeb (diff) | |
download | FreeBSD-src-4822432874e997891c75df8d30dcab4c52d1a9fa.zip FreeBSD-src-4822432874e997891c75df8d30dcab4c52d1a9fa.tar.gz |
Clean up some ambiguous nested if/elses.
Diffstat (limited to 'usr.bin/id/id.c')
-rw-r--r-- | usr.bin/id/id.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/id/id.c b/usr.bin/id/id.c index c1e5902..2b6c96b 100644 --- a/usr.bin/id/id.c +++ b/usr.bin/id/id.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "@(#)id.c 8.2 (Berkeley) 2/16/94"; #endif static const char rcsid[] = - "$Id: id.c,v 1.6 1998/02/18 17:35:16 steve Exp $"; + "$Id: id.c,v 1.7 1998/08/21 06:47:58 obrien Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -181,16 +181,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); } |