svn commit: r298233 - head/bin/ps

Marcelo Araujo araujo at FreeBSD.org
Tue Apr 19 00:40:44 UTC 2016


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)


More information about the svn-src-head mailing list