diff options
| -rw-r--r-- | util-linux/mkfs_ext2.c | 5 |
1 files changed, 3 insertions, 2 deletions
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) | |||
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | // taken from mkfs_minix.c. libbb candidate? | 77 | // taken from mkfs_minix.c. libbb candidate? |
| 78 | static unsigned div_roundup(uint64_t size, uint32_t n) | 78 | // why "uint64_t size"? we never use it for anything >32 bits |
| 79 | static uint32_t div_roundup(uint64_t size, uint32_t n) | ||
| 79 | { | 80 | { |
| 80 | // Overflow-resistant | 81 | // Overflow-resistant |
| 81 | uint64_t res = size / n; | 82 | uint32_t res = size / n; |
| 82 | if (res * n != size) | 83 | if (res * n != size) |
| 83 | res++; | 84 | res++; |
| 84 | return res; | 85 | return res; |
