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

MFC after:	2 weeks.
This commit is contained in:
araujo 2016-04-22 03:32:14 +00:00
parent 3f525b8a34
commit 3b04951cce

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