libbb: code shrink: introduce and use [_]exit_SUCCESS()

function                                             old     new   delta
exit_SUCCESS                                           -       7      +7
_exit_SUCCESS                                          -       7      +7
run_pipe                                            1562    1567      +5
pseudo_exec_argv                                     399     400      +1
finish                                                86      87      +1
start_stop_daemon_main                              1109    1107      -2
shutdown_on_signal                                    38      36      -2
runsv_main                                          1662    1660      -2
redirect                                            1070    1068      -2
read_line                                             79      77      -2
pause_and_low_level_reboot                            54      52      -2
list_i2c_busses_and_exit                             483     481      -2
less_exit                                             12      10      -2
identify                                            4123    4121      -2
grep_file                                           1161    1159      -2
getty_main                                          1519    1517      -2
fsck_minix_main                                     2681    2679      -2
free_session                                         132     130      -2
fdisk_main                                          4739    4737      -2
clean_up_and_exit                                     53      51      -2
bsd_select                                          1566    1564      -2
bb_daemonize_or_rexec                                198     196      -2
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 3/17 up/down: 21/-34)           Total: -13 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2022-01-05 22:16:06 +01:00
parent 076f5e064f
commit db5546ca10
24 changed files with 45 additions and 33 deletions

View File

@@ -333,10 +333,10 @@ static void restore_tty(void)
clear_line();
}
static void less_exit(void)
static NOINLINE void less_exit(void)
{
restore_tty();
exit(EXIT_SUCCESS);
exit_SUCCESS();
}
#if (ENABLE_FEATURE_LESS_DASHCMD && ENABLE_FEATURE_LESS_LINENUMS) \