summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authoraraujo <araujo@FreeBSD.org>2016-04-18 05:19:45 +0000
committeraraujo <araujo@FreeBSD.org>2016-04-18 05:19:45 +0000
commit25333787db7b96c565f826f86cb864488835861f (patch)
tree19df4f8ca7fb76ab1db91557757f976110ec0b54 /usr.sbin
parentd2ff81490f54ee7dce8300a6be73933fc2b787d8 (diff)
downloadFreeBSD-src-25333787db7b96c565f826f86cb864488835861f.zip
FreeBSD-src-25333787db7b96c565f826f86cb864488835861f.tar.gz
The malloc will return NULL if it can't allocate memory.
MFC after: 2 weeks.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/makefs/ffs/mkfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/makefs/ffs/mkfs.c b/usr.sbin/makefs/ffs/mkfs.c
index b1bdd09..dfdaf57 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);
}
OpenPOWER on IntegriCloud