Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2022-01-06 00:16:06 +0300
committerDenys Vlasenko <vda.linux@googlemail.com>2022-01-06 00:16:06 +0300
commitdb5546ca101846f18294a43b39883bc4ff53613a (patch)
treef8bb8a4835b70f4693dcf83edfa432c21d0ee77f /shell
parent076f5e064fa7b6cc2c03b030abcf2cbd60514180 (diff)
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>
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c2
-rw-r--r--shell/hush.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 827643808..4a8ec0c03 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -5505,7 +5505,7 @@ openhere(union node *redir)
ignoresig(SIGTSTP); //signal(SIGTSTP, SIG_IGN);
signal(SIGPIPE, SIG_DFL);
xwrite(pip[1], p, len);
- _exit(EXIT_SUCCESS);
+ _exit_SUCCESS();
}
out:
close(pip[1]);
diff --git a/shell/hush.c b/shell/hush.c
index 6a27b1634..982fc356a 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -8587,7 +8587,7 @@ static NOINLINE void pseudo_exec_argv(nommu_save_t *nommu_save,
* expand_assignments(): think about ... | var=`sleep 1` | ...
*/
free_strings(new_env);
- _exit(EXIT_SUCCESS);
+ _exit_SUCCESS();
}
sv_shadowed = G.shadowed_vars_pp;
@@ -8768,7 +8768,7 @@ static void pseudo_exec(nommu_save_t *nommu_save,
/* Case when we are here: ... | >file */
debug_printf_exec("pseudo_exec'ed null command\n");
- _exit(EXIT_SUCCESS);
+ _exit_SUCCESS();
}
#if ENABLE_HUSH_JOB