Use NULL instead of 0.
malloc will return NULL in case it cannot allocate memory. MFC after: 2 weeks.
This commit is contained in:
parent
8e58be03e7
commit
0b410d9c57
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user