From e15a67f910a71cd2e80c76aa896f3e331a856736 Mon Sep 17 00:00:00 2001 From: araujo Date: Mon, 18 Apr 2016 07:47:26 +0000 Subject: 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(-) (limited to 'sbin/fsdb') diff --git a/sbin/fsdb/fsdbutil.c b/sbin/fsdb/fsdbutil.c index ba0b64e..265a096 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++) -- cgit v1.1