From: Denys Vlasenko Date: Mon, 19 Oct 2009 22:16:24 +0000 (+0200) Subject: mkfs_ext2: small tweak X-Git-Tag: 1_16_0~359 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=69f2e2cdeba8237d51fe63aa32efbd178ce02663;p=oweals%2Fbusybox.git mkfs_ext2: small tweak Signed-off-by: Denys Vlasenko --- diff --git a/util-linux/mkfs_ext2.c b/util-linux/mkfs_ext2.c index d0ebc1dd9..e840f7810 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;