From owner-svn-src-all@freebsd.org Tue Apr 19 00:40:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D7AAB135E8; Tue, 19 Apr 2016 00:40:44 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EE5117C5; Tue, 19 Apr 2016 00:40:44 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3J0eh7l074869; Tue, 19 Apr 2016 00:40:43 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3J0ehdC074868; Tue, 19 Apr 2016 00:40:43 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201604190040.u3J0ehdC074868@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Tue, 19 Apr 2016 00:40:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298233 - 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-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2016 00:40:44 -0000 Author: araujo Date: Tue Apr 19 00:40:43 2016 New Revision: 298233 URL: https://svnweb.freebsd.org/changeset/base/298233 Log: Use NULL instead of 0 for pointers. kvm_open(3) will return NULL when it cannot access kernel virtual memory. MFC after: 2 weeks. Modified: head/bin/ps/ps.c Modified: head/bin/ps/ps.c ============================================================================== --- head/bin/ps/ps.c Tue Apr 19 00:38:07 2016 (r298232) +++ head/bin/ps/ps.c Tue Apr 19 00:40:43 2016 (r298233) @@ -451,7 +451,7 @@ main(int argc, char *argv[]) xkeep = xkeep_implied; kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, errbuf); - if (kd == 0) + if (kd == NULL) xo_errx(1, "%s", errbuf); if (!_fmt)