aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDavid Greenman <dg@FreeBSD.org>1995-08-30 10:25:41 +0000
committerDavid Greenman <dg@FreeBSD.org>1995-08-30 10:25:41 +0000
commit44193e89229a9c597643d05e43d525a904bc320f (patch)
tree56affda884c4a145c0f869ea69acb932682e8604 /usr.bin
parent727b54ab17e1208fd6e1f5ca423346f03f180c58 (diff)
Notes
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/id/id.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/usr.bin/id/id.c b/usr.bin/id/id.c
index 9b306ce4d114d..61cae11a58f8f 100644
--- a/usr.bin/id/id.c
+++ b/usr.bin/id/id.c
@@ -231,24 +231,24 @@ user(pw)
{
register struct group *gr;
register char *fmt, **p;
- int cnt, id, lastid, ngroups, groups[NGROUPS + 1];
+ int cnt, gid, lastgid, ngroups, groups[NGROUPS + 1];
- id = pw->pw_uid;
- (void)printf("uid=%u(%s)", id, pw->pw_name);
- (void)printf(" gid=%u", pw->pw_gid);
- if (gr = getgrgid(id))
+ (void)printf("uid=%u(%s)", pw->pw_uid, pw->pw_name);
+ gid = pw->pw_gid;
+ (void)printf(" gid=%u", gid);
+ if (gr = getgrgid(gid))
(void)printf("(%s)", gr->gr_name);
ngroups = NGROUPS + 1;
- (void) getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups);
+ (void) getgrouplist(pw->pw_name, gid, groups, &ngroups);
fmt = " groups=%u";
- for (lastid = -1, cnt = 0; cnt < ngroups; ++cnt) {
- if (lastid == (id = groups[cnt]))
+ for (lastgid = -1, cnt = 0; cnt < ngroups; ++cnt) {
+ if (lastgid == (gid = groups[cnt]))
continue;
- (void)printf(fmt, id);
+ (void)printf(fmt, gid);
fmt = " %u";
- if (gr = getgrgid(id))
+ if (gr = getgrgid(gid))
(void)printf("(%s)", gr->gr_name);
- lastid = id;
+ lastgid = gid;
}
(void)printf("\n");
}