ubase

suckless linux base utils
git clone git://git.2f30.org/ubase
Log | Files | Refs | README | LICENSE

commit fa0b80442c2b7b81a38447db0b223d4d66e37748
parent f48d545c77c013aa6da92b011a053699cb45622c
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat, 12 Jul 2014 20:32:36 +0000

ps: one case for error handling

Diffstat:
Mps.c | 8++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/ps.c b/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:");