From 2b91958dff0b7bae83cf2c3f2db55bd248fe0956 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Fri, 8 Apr 2016 11:57:20 +0100 Subject: Rewrite iteration through applet names to save a few bytes function old new delta run_applet_and_exit 758 755 -3 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-3) Total: -3 bytes In standalone shell mode the saving increases to 17 bytes. Signed-off-by: Ron Yorston Signed-off-by: Denys Vlasenko --- libbb/appletlib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libbb/appletlib.c') diff --git a/libbb/appletlib.c b/libbb/appletlib.c index de654f64c..b682e6b85 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c @@ -791,7 +791,8 @@ static int busybox_main(char **argv) full_write2_str(a); full_write2_str("\n"); i++; - a += strlen(a) + 1; + while (*a++ != '\0') + continue; } return 0; } -- cgit v1.2.3