summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2009-10-20 00:16:24 +0200
committerDenys Vlasenko2009-10-20 00:16:24 +0200
commit69f2e2cdeba8237d51fe63aa32efbd178ce02663 (patch)
tree4023dd89fe90020fba4c04ba081d61a8b61d4214
parent05647b55512d0fec74fe6d69553a773e852674df (diff)
downloadbusybox-69f2e2cdeba8237d51fe63aa32efbd178ce02663.zip
busybox-69f2e2cdeba8237d51fe63aa32efbd178ce02663.tar.gz
mkfs_ext2: small tweak
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--util-linux/mkfs_ext2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/util-linux/mkfs_ext2.c b/util-linux/mkfs_ext2.c
index d0ebc1d..e840f78 100644
--- a/util-linux/mkfs_ext2.c
+++ b/util-linux/mkfs_ext2.c
@@ -75,10 +75,11 @@ static unsigned int_log2(unsigned arg)
}
// taken from mkfs_minix.c. libbb candidate?
-static unsigned div_roundup(uint64_t size, uint32_t n)
+// why "uint64_t size"? we never use it for anything >32 bits
+static uint32_t div_roundup(uint64_t size, uint32_t n)
{
// Overflow-resistant
- uint64_t res = size / n;
+ uint32_t res = size / n;
if (res * n != size)
res++;
return res;