Use macro MAX() from sys/param.h.
MFC after: 2 weeks.
This commit is contained in:
parent
3f525b8a34
commit
3b04951cce
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user