From 0fc01e5adf53d99d1b3aa4f7689a080f230d8e52 Mon Sep 17 00:00:00 2001 From: bde Date: Sun, 31 May 1998 12:21:50 +0000 Subject: Fixed overflow in the calculation of the number of inodes per group for filesystems with almost the maximum number of sectors. The maxiumum is 2^31, but overflow is common for that size, and overflow normally occurred here at size (2^31 - 4096). --- sbin/newfs/mkfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sbin/newfs') diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index c232256..b21c458 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -1059,7 +1059,7 @@ calcipg(cpg, bpcg, usedbp) * Prepare to scale by fssize / (number of sectors in cylinder groups). * Note that fssize is still in sectors, not filesystem blocks. */ - ncyl = howmany(fssize, secpercyl); + ncyl = howmany(fssize, (u_int)secpercyl); ncg = howmany(ncyl, cpg); /* * Iterate a few times to allow for ipg depending on itself. -- cgit v1.1