From 3b04951cceac4f2b1d56b9c14d9b56c7535a9bdf Mon Sep 17 00:00:00 2001 From: araujo Date: Fri, 22 Apr 2016 03:32:14 +0000 Subject: [PATCH] Use macro MAX() from sys/param.h. MFC after: 2 weeks. --- sbin/fsck_msdosfs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/fsck_msdosfs/dir.c b/sbin/fsck_msdosfs/dir.c index 7ac07f6b3ffa..52f1e9c3d635 100644 --- a/sbin/fsck_msdosfs/dir.c +++ b/sbin/fsck_msdosfs/dir.c @@ -223,7 +223,7 @@ resetDosDirSection(struct bootblock *boot, struct fatEntry *fat) b1 = boot->bpbRootDirEnts * 32; b2 = boot->bpbSecPerClust * boot->bpbBytesPerSec; - if ((buffer = malloc(len = b1 > b2 ? b1 : b2)) == NULL) { + if ((buffer = malloc(len = MAX(b1, b2))) == NULL) { perr("No space for directory buffer (%zu)", len); return FSFATAL; }