diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index 2b58167c0aa3..b8921b47ab51 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -841,7 +841,7 @@ ffs_valloc(pvp, mode, cred, vpp) ipref = ffs_dirpref(pip); else ipref = pip->i_number; - if (ipref >= fs->fs_ncg * fs->fs_ipg) + if ((unsigned)ipref >= fs->fs_ncg * fs->fs_ipg) ipref = 0; cg = ino_to_cg(fs, ipref); /*