style and message text fixes
authorDenis Vlasenko <vda.linux@googlemail.com>
Thu, 27 Sep 2007 10:17:53 +0000 (10:17 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Thu, 27 Sep 2007 10:17:53 +0000 (10:17 -0000)
miscutils/crontab.c
util-linux/ipcs.c

index 69f2e31233356a252d88d7f48458f26da976412f..1b827d7913818323df4261ab2297764b244e2cea 100644 (file)
@@ -324,7 +324,7 @@ static int ChangeUser(const char *user, short dochdir)
 
        pas = getpwnam(user);
        if (pas == NULL) {
-               bb_perror_msg_and_die("failed to get uid for %s", user);
+               bb_perror_msg_and_die("cannot get uid for %s", user);
        }
        setenv("USER", pas->pw_name, 1);
        setenv("HOME", pas->pw_dir, 1);
index e11c2de04a6fd4aa8755d94c78a6587ab4ad55a8..0b4dbf6435eed8acdec02215230eb0a3f0c12c8b 100644 (file)
@@ -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);
 }