diff options
author | Ron Yorston <rmy@pobox.com> | 2016-04-08 11:57:20 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-04-15 22:13:51 +0200 |
commit | 2b91958dff0b7bae83cf2c3f2db55bd248fe0956 (patch) | |
tree | 3b31eba78e93613ea307dde0fbd8995d47c15500 /libbb/appletlib.c | |
parent | e4d925b8899e38437311d2c63d0d0d200e04b5a1 (diff) | |
download | busybox-w32-2b91958dff0b7bae83cf2c3f2db55bd248fe0956.tar.gz busybox-w32-2b91958dff0b7bae83cf2c3f2db55bd248fe0956.tar.bz2 busybox-w32-2b91958dff0b7bae83cf2c3f2db55bd248fe0956.zip |
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 <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/appletlib.c')
-rw-r--r-- | libbb/appletlib.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) | |||
791 | full_write2_str(a); | 791 | full_write2_str(a); |
792 | full_write2_str("\n"); | 792 | full_write2_str("\n"); |
793 | i++; | 793 | i++; |
794 | a += strlen(a) + 1; | 794 | while (*a++ != '\0') |
795 | continue; | ||
795 | } | 796 | } |
796 | return 0; | 797 | return 0; |
797 | } | 798 | } |