hush: code shrink

function                                             old     new   delta
run_applet_main                                        -      20     +20
builtin_kill                                         296     288      -8
builtin_test                                          19      10      -9
builtin_printf                                        19      10      -9
builtin_echo                                          19      10      -9
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/4 up/down: 20/-35)            Total: -15 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2020-12-14 03:52:54 +01:00
parent 84d5eddb25
commit a8e19608fc

View File

@ -10499,7 +10499,7 @@ static int FAST_FUNC builtin_true(char **argv UNUSED_PARAM)
}
#if ENABLE_HUSH_TEST || ENABLE_HUSH_ECHO || ENABLE_HUSH_PRINTF || ENABLE_HUSH_KILL
static int run_applet_main(char **argv, int (*applet_main_func)(int argc, char **argv))
static NOINLINE int run_applet_main(char **argv, int (*applet_main_func)(int argc, char **argv))
{
int argc = string_array_len(argv);
return applet_main_func(argc, argv);