[git commit master] mkfs_ext2: code shrink

Denys Vlasenko vda.linux at googlemail.com
Sat Oct 17 21:27:29 UTC 2009


commit: http://git.busybox.net/busybox/commit/?id=9c2708ebf96b7742f33dc49df7001a377b50c1a9
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

function                                             old     new   delta
div_roundup                                            -      15     +15
mkfs_ext2_main                                      1980    1933     -47

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 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 41f37c2..83e8105 100644
--- a/util-linux/mkfs_ext2.c
+++ b/util-linux/mkfs_ext2.c
@@ -59,16 +59,16 @@ struct ext2_dir {
 	char     name3[12];
 };
 
-static inline int int_log2(int arg)
+static unsigned int_log2(unsigned arg)
 {
-	int r = 0;
+	unsigned r = 0;
 	while ((arg >>= 1) != 0)
 		r++;
 	return r;
 }
 
 // taken from mkfs_minix.c. libbb candidate?
-static ALWAYS_INLINE unsigned div_roundup(uint32_t size, uint32_t n)
+static unsigned div_roundup(uint32_t size, uint32_t n)
 {
 	return (size + n-1) / n;
 }
-- 
1.6.3.3



More information about the busybox-cvs mailing list