summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2014-01-02 13:59:23 +0000
committertrasz <trasz@FreeBSD.org>2014-01-02 13:59:23 +0000
commit62bfe594dfb4d3de69c24ce468f66d1a681dcaf2 (patch)
tree0c084ef0315d524a3553c20ad27c3919bb07d6ba /bin
parent58ba35d28de5a389bea9be3d21a89154322dac03 (diff)
downloadFreeBSD-src-62bfe594dfb4d3de69c24ce468f66d1a681dcaf2.zip
FreeBSD-src-62bfe594dfb4d3de69c24ce468f66d1a681dcaf2.tar.gz
MFC r256838:
Don't test arrays for being NULL. Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'bin')
-rw-r--r--bin/ps/print.c8
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));
}
OpenPOWER on IntegriCloud