From 846bf43ca4a2b42f2751df935de6d3257c6169ae Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Fri, 23 Feb 2024 19:30:10 +0200 Subject: [PATCH] fs/msdosfs fatblock: use ulmin() rather than min() PR: 277237 (cherry picked from commit 0085afdceb17cb7d4e41f9073299f688372c6a0f) --- sys/fs/msdosfs/msdosfs_fat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/msdosfs/msdosfs_fat.c b/sys/fs/msdosfs/msdosfs_fat.c index 4a7faa9e1f05..bfaff417f677 100644 --- a/sys/fs/msdosfs/msdosfs_fat.c +++ b/sys/fs/msdosfs/msdosfs_fat.c @@ -97,7 +97,7 @@ fatblock(struct msdosfsmount *pmp, u_long ofs, u_long *bnp, u_long *sizep, fatblocksec /= 2; } bn = ofs / pmp->pm_fatblocksize * pmp->pm_fatblocksec; - size = roundup(min(fatblocksec, pmp->pm_FATsecs - bn) * DEV_BSIZE, + size = roundup(ulmin(fatblocksec, pmp->pm_FATsecs - bn) * DEV_BSIZE, pmp->pm_BlkPerSec * DEV_BSIZE); bn += pmp->pm_fatblk + pmp->pm_curfat * pmp->pm_FATsecs;