Date: Tue, 19 Apr 2016 01:01:22 +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: r298235 - head/sbin/dump Message-ID: <201604190101.u3J11Mfi082934@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604190101.u3J11Mfi082934>