Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Apr 2016 00:40:43 +0000 (UTC)
From:      Marcelo Araujo <araujo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r298233 - head/bin/ps
Message-ID:  <201604190040.u3J0ehdC074868@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604190040.u3J0ehdC074868>