diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-17 23:27:29 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-17 23:27:29 +0200 |
commit | 9c2708ebf96b7742f33dc49df7001a377b50c1a9 (patch) | |
tree | 5e0732f75f36783cf3152b7c21cf84901387af42 /util-linux/mkfs_ext2.c | |
parent | 7d8ab846d1f6044cc6c1fc5e3b1a586a9d78637c (diff) | |
download | busybox-w32-9c2708ebf96b7742f33dc49df7001a377b50c1a9.tar.gz busybox-w32-9c2708ebf96b7742f33dc49df7001a377b50c1a9.tar.bz2 busybox-w32-9c2708ebf96b7742f33dc49df7001a377b50c1a9.zip |
mkfs_ext2: code shrink
function old new delta
div_roundup - 15 +15
mkfs_ext2_main 1980 1933 -47
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux/mkfs_ext2.c')
-rw-r--r-- | util-linux/mkfs_ext2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/util-linux/mkfs_ext2.c b/util-linux/mkfs_ext2.c index 41f37c287..83e81054b 100644 --- a/util-linux/mkfs_ext2.c +++ b/util-linux/mkfs_ext2.c | |||
@@ -59,16 +59,16 @@ struct ext2_dir { | |||
59 | char name3[12]; | 59 | char name3[12]; |
60 | }; | 60 | }; |
61 | 61 | ||
62 | static inline int int_log2(int arg) | 62 | static unsigned int_log2(unsigned arg) |
63 | { | 63 | { |
64 | int r = 0; | 64 | unsigned r = 0; |
65 | while ((arg >>= 1) != 0) | 65 | while ((arg >>= 1) != 0) |
66 | r++; | 66 | r++; |
67 | return r; | 67 | return r; |
68 | } | 68 | } |
69 | 69 | ||
70 | // taken from mkfs_minix.c. libbb candidate? | 70 | // taken from mkfs_minix.c. libbb candidate? |
71 | static ALWAYS_INLINE unsigned div_roundup(uint32_t size, uint32_t n) | 71 | static unsigned div_roundup(uint32_t size, uint32_t n) |
72 | { | 72 | { |
73 | return (size + n-1) / n; | 73 | return (size + n-1) / n; |
74 | } | 74 | } |