svn commit: r298441 - head/sbin/fsck_msdosfs
Marcelo Araujo
araujo at FreeBSD.org
Fri Apr 22 03:32:16 UTC 2016
Author: araujo
Date: Fri Apr 22 03:32:14 2016
New Revision: 298441
URL: https://svnweb.freebsd.org/changeset/base/298441
Log:
Use macro MAX() from sys/param.h.
MFC after: 2 weeks.
Modified:
head/sbin/fsck_msdosfs/dir.c
Modified: head/sbin/fsck_msdosfs/dir.c
==============================================================================
--- head/sbin/fsck_msdosfs/dir.c Thu Apr 21 21:30:51 2016 (r298440)
+++ head/sbin/fsck_msdosfs/dir.c Fri Apr 22 03:32:14 2016 (r298441)
@@ -223,7 +223,7 @@ resetDosDirSection(struct bootblock *boo
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;
}
More information about the svn-src-head
mailing list