Use NULL instead of 0 for pointers.
malloc will return NULL if it cannot allocate memory. MFC after: 2 weeks.
This commit is contained in:
parent
cd5f6a0cc1
commit
7fd35136d9
@ -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++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user