mirror of git://git.suckless.org/ubase
ps: one case for error handling
This commit is contained in:
parent
f48d545c77
commit
fa0b80442c
8
ps.c
8
ps.c
|
@ -136,12 +136,8 @@ psout(struct procstat *ps)
|
|||
} else {
|
||||
errno = 0;
|
||||
pw = getpwuid(pstatus.uid);
|
||||
if (!pw) {
|
||||
if (errno)
|
||||
eprintf("getpwuid %d:", pstatus.uid);
|
||||
else
|
||||
eprintf("getpwuid %d: no such user\n", pstatus.uid);
|
||||
}
|
||||
if (!pw)
|
||||
eprintf("getpwuid %d:", pstatus.uid);
|
||||
|
||||
if (sysinfo(&info) < 0)
|
||||
eprintf("sysinfo:");
|
||||
|
|
Loading…
Reference in New Issue