[hackers] [ubase] ps: one case for error handling || Hiltjo Posthuma
commit fa0b80442c2b7b81a38447db0b223d4d66e37748
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Sat Jul 12 20:32:36 2014 +0000
ps: one case for error handling
diff --git a/ps.c b/ps.c
index df120c7..414412b 100644
--- a/ps.c
+++ b/ps.c
_AT_@ -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
", pstatus.uid);
- }
+ if (!pw)
+ eprintf("getpwuid %d:", pstatus.uid);
if (sysinfo(&info) < 0)
eprintf("sysinfo:");
Received on Sat Jul 12 2014 - 21:04:27 CEST
This archive was generated by hypermail 2.3.0
: Sat Jul 12 2014 - 21:12:09 CEST