diff options
author | trasz <trasz@FreeBSD.org> | 2013-10-21 09:12:04 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2013-10-21 09:12:04 +0000 |
commit | 6d8fb50c15c114b38ff68bae5663f3a63f0240c5 (patch) | |
tree | 906b724646b958bb4dccea37ce3138b1ec013f8d /bin/ps/print.c | |
parent | 6fe8205051cd1f9ef9fafc97789953f8121cab8a (diff) | |
download | FreeBSD-src-6d8fb50c15c114b38ff68bae5663f3a63f0240c5.zip FreeBSD-src-6d8fb50c15c114b38ff68bae5663f3a63f0240c5.tar.gz |
Don't test arrays for being NULL.
MFC after: 1 month
Diffstat (limited to 'bin/ps/print.c')
-rw-r--r-- | bin/ps/print.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c index f36411e..bcd451e 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -797,8 +797,6 @@ char * emulname(KINFO *k, VARENT *ve __unused) { - if (k->ki_p->ki_emul == NULL) - return (NULL); return (strdup(k->ki_p->ki_emul)); } @@ -827,7 +825,6 @@ out: char * loginclass(KINFO *k, VARENT *ve __unused) { - char *s; /* * Don't display login class for system processes; @@ -837,8 +834,5 @@ loginclass(KINFO *k, VARENT *ve __unused) if (k->ki_p->ki_flag & P_SYSTEM) { return (strdup("-")); } - s = k->ki_p->ki_loginclass; - if (s == NULL) - return (NULL); - return (strdup(s)); + return (strdup(k->ki_p->ki_loginclass)); } |