Date: Mon, 21 Oct 2013 09:12:04 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r256838 - head/bin/ps Message-ID: <201310210912.r9L9C4hj066581@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Mon Oct 21 09:12:04 2013 New Revision: 256838 URL: http://svnweb.freebsd.org/changeset/base/256838 Log: Don't test arrays for being NULL. MFC after: 1 month Modified: head/bin/ps/print.c Modified: head/bin/ps/print.c ============================================================================== --- head/bin/ps/print.c Mon Oct 21 09:03:30 2013 (r256837) +++ head/bin/ps/print.c Mon Oct 21 09:12:04 2013 (r256838) @@ -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)); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310210912.r9L9C4hj066581>