Skip to content

Commit

Permalink
Use NULL instead of 0 for pointers.
Browse files Browse the repository at this point in the history
malloc will return NULL if it cannot allocate memory.

MFC after:	2 weeks.
  • Loading branch information
araujobsd committed Apr 18, 2016
1 parent cd5f6a0 commit 7fd3513
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sbin/fsdb/fsdbutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand Down

0 comments on commit 7fd3513

Please sign in to comment.