From bb0bd931dc6ac74463ac169a03fe14ef425b1d3d Mon Sep 17 00:00:00 2001 From: Marcelo Araujo Date: Mon, 18 Apr 2016 05:19:45 +0000 Subject: [PATCH] The malloc will return NULL if it can't allocate memory. MFC after: 2 weeks. --- usr.sbin/makefs/ffs/mkfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/makefs/ffs/mkfs.c b/usr.sbin/makefs/ffs/mkfs.c index b1bdd098f36b..dfdaf57b8f0f 100644 --- a/usr.sbin/makefs/ffs/mkfs.c +++ b/usr.sbin/makefs/ffs/mkfs.c @@ -492,7 +492,7 @@ ffs_mkfs(const char *fsys, const fsinfo_t *fsopts) iobufsize = SBLOCKSIZE + 3 * sblock.fs_bsize; else iobufsize = 4 * sblock.fs_bsize; - if ((iobuf = malloc(iobufsize)) == 0) { + if ((iobuf = malloc(iobufsize)) == NULL) { printf("Cannot allocate I/O buffer\n"); exit(38); }