From owner-svn-src-head@FreeBSD.ORG Mon Oct 21 09:12:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 71F64682; Mon, 21 Oct 2013 09:12:05 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5FA522782; Mon, 21 Oct 2013 09:12:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9L9C5PY066582; Mon, 21 Oct 2013 09:12:05 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9L9C4hj066581; Mon, 21 Oct 2013 09:12:04 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201310210912.r9L9C4hj066581@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 21 Oct 2013 09:12:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r256838 - head/bin/ps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Oct 2013 09:12:05 -0000 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)); }