From 0b410d9c570e4c5af73425d136042e0682988df7 Mon Sep 17 00:00:00 2001 From: Marcelo Araujo Date: Tue, 19 Apr 2016 01:01:22 +0000 Subject: [PATCH] Use NULL instead of 0. malloc will return NULL in case it cannot allocate memory. MFC after: 2 weeks. --- sbin/dump/traverse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/dump/traverse.c b/sbin/dump/traverse.c index 8a9a378dfc40..2aa0305a6867 100644 --- a/sbin/dump/traverse.c +++ b/sbin/dump/traverse.c @@ -928,7 +928,7 @@ bread(ufs2_daddr_t blkno, char *buf, int size) 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;