Use macro MAX() from sys/param.h.

MFC after:	2 weeks.
This commit is contained in:
Marcelo Araujo 2016-04-22 03:32:14 +00:00
parent e55a6575d9
commit 091ea4a091

View File

@ -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;
}