Use NULL instead of 0.

malloc will return NULL in case it cannot allocate memory.

MFC after:	2 weeks.
This commit is contained in:
Marcelo Araujo 2016-04-19 01:01:22 +00:00
parent 8e58be03e7
commit 0b410d9c57

View File

@ -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;