From 7fd35136d92423922eee6352bd24f95f250fb1f0 Mon Sep 17 00:00:00 2001 From: Marcelo Araujo Date: Mon, 18 Apr 2016 07:47:26 +0000 Subject: [PATCH] Use NULL instead of 0 for pointers. malloc will return NULL if it cannot allocate memory. MFC after: 2 weeks. --- sbin/fsdb/fsdbutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/fsdb/fsdbutil.c b/sbin/fsdb/fsdbutil.c index ba0b64e7280..265a0965cbc 100644 --- a/sbin/fsdb/fsdbutil.c +++ b/sbin/fsdb/fsdbutil.c @@ -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++)