Date: Mon, 18 Apr 2016 07:47:26 +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: r298195 - head/sbin/fsdb Message-ID: <201604180747.u3I7lQAC064767@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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++)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604180747.u3I7lQAC064767>