svn commit: r298195 - head/sbin/fsdb

Marcelo Araujo araujo at FreeBSD.org
Mon Apr 18 07:47:28 UTC 2016


Author: araujo
Date: Mon Apr 18 07:47:26 2016
New Revision: 298195
URL: https://svnweb.freebsd.org/changeset/base/298195

Log:
  Use NULL instead of 0 for pointers.
  
  malloc will return NULL if it cannot allocate memory.
  
  MFC after:	2 weeks.

Modified:
  head/sbin/fsdb/fsdbutil.c

Modified: head/sbin/fsdb/fsdbutil.c
==============================================================================
--- head/sbin/fsdb/fsdbutil.c	Mon Apr 18 07:44:53 2016	(r298194)
+++ head/sbin/fsdb/fsdbutil.c	Mon Apr 18 07:47:26 2016	(r298195)
@@ -310,7 +310,7 @@ printblocks(ino_t inum, union dinode *dp
 	return;
 
     bufp = malloc((unsigned int)sblock.fs_bsize);
-    if (bufp == 0)
+    if (bufp == NULL)
 	errx(EEXIT, "cannot allocate indirect block buffer");
     printf("Indirect blocks:\n");
     for (i = 0; i < NIADDR; i++)


More information about the svn-src-all mailing list