summaryrefslogtreecommitdiffhomepage
path: root/util-linux
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-09-27 10:17:53 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-09-27 10:17:53 +0000
commit1acdc89e992eb3f0548ff48ba586b31c9a0ae232 (patch)
tree98b753409267f57c391565ffb44850d8d00a7e96 /util-linux
parent86b29ea9e8d14436fde48fedf2896ae679201266 (diff)
style and message text fixes
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/ipcs.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/util-linux/ipcs.c b/util-linux/ipcs.c
index e11c2de04..0b4dbf643 100644
--- a/util-linux/ipcs.c
+++ b/util-linux/ipcs.c
@@ -99,23 +99,19 @@ static void print_perms(int id, struct ipc_perm *ipcp)
printf("%-10d %-10o", id, ipcp->mode & 0777);
- if ((pw = getpwuid(ipcp->cuid)))
- printf(" %-10s", pw->pw_name);
- else
- printf(" %-10d", ipcp->cuid);
- if ((gr = getgrgid(ipcp->cgid)))
- printf(" %-10s", gr->gr_name);
- else
- printf(" %-10d", ipcp->cgid);
-
- if ((pw = getpwuid(ipcp->uid)))
- printf(" %-10s", pw->pw_name);
- else
- printf(" %-10d", ipcp->uid);
- if ((gr = getgrgid(ipcp->gid)))
- printf(" %-10s\n", gr->gr_name);
- else
- printf(" %-10d\n", ipcp->gid);
+ pw = getpwuid(ipcp->cuid);
+ if (pw) printf(" %-10s", pw->pw_name);
+ else printf(" %-10d", ipcp->cuid);
+ gr = getgrgid(ipcp->cgid);
+ if (gr) printf(" %-10s", gr->gr_name);
+ else printf(" %-10d", ipcp->cgid);
+
+ pw = getpwuid(ipcp->uid);
+ if (pw) printf(" %-10s", pw->pw_name);
+ else printf(" %-10d", ipcp->uid);
+ gr = getgrgid(ipcp->gid);
+ if (gr) printf(" %-10s\n", gr->gr_name);
+ else printf(" %-10d\n", ipcp->gid);
}