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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298195
@ -310,7 +310,7 @@ printblocks(ino_t inum, union dinode *dp)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
bufp = malloc((unsigned int)sblock.fs_bsize);
|
bufp = malloc((unsigned int)sblock.fs_bsize);
|
||||||
if (bufp == 0)
|
if (bufp == NULL)
|
||||||
errx(EEXIT, "cannot allocate indirect block buffer");
|
errx(EEXIT, "cannot allocate indirect block buffer");
|
||||||
printf("Indirect blocks:\n");
|
printf("Indirect blocks:\n");
|
||||||
for (i = 0; i < NIADDR; i++)
|
for (i = 0; i < NIADDR; i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user