svn commit: r298235 - head/sbin/dump

Marcelo Araujo araujo at FreeBSD.org
Tue Apr 19 01:01:23 UTC 2016


Author: araujo
Date: Tue Apr 19 01:01:22 2016
New Revision: 298235
URL: https://svnweb.freebsd.org/changeset/base/298235

Log:
  Use NULL instead of 0.
  
  malloc will return NULL in case it cannot allocate memory.
  
  MFC after:	2 weeks.

Modified:
  head/sbin/dump/traverse.c

Modified: head/sbin/dump/traverse.c
==============================================================================
--- head/sbin/dump/traverse.c	Tue Apr 19 00:59:15 2016	(r298234)
+++ head/sbin/dump/traverse.c	Tue Apr 19 01:01:22 2016	(r298235)
@@ -928,7 +928,7 @@ loop:
 		if (cnt == size)
 			return;
 	} else {
-		if (tmpbuf == NULL && (tmpbuf = malloc(secsize)) == 0)
+		if (tmpbuf == NULL && (tmpbuf = malloc(secsize)) == NULL)
 			quit("buffer malloc failed\n");
 		xfer = 0;
 		bytes = size;


More information about the svn-src-all mailing list