summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorDenys Vlasenko2022-01-05 22:16:06 +0100
committerDenys Vlasenko2022-01-05 22:16:06 +0100
commitdb5546ca101846f18294a43b39883bc4ff53613a (patch)
treef8bb8a4835b70f4693dcf83edfa432c21d0ee77f /networking
parent076f5e064fa7b6cc2c03b030abcf2cbd60514180 (diff)
downloadbusybox-db5546ca101846f18294a43b39883bc4ff53613a.zip
busybox-db5546ca101846f18294a43b39883bc4ff53613a.tar.gz
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 'networking')
-rw-r--r--networking/arping.c2
-rw-r--r--networking/inetd.c2
-rw-r--r--networking/nc.c2
-rw-r--r--networking/telnetd.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/networking/arping.c b/networking/arping.c
index d44d7d6..86f0221 100644
--- a/networking/arping.c
+++ b/networking/arping.c
@@ -159,7 +159,7 @@ static void finish(void)
if (option_mask32 & DAD)
exit(!!received);
if (option_mask32 & UNSOLICITED)
- exit(EXIT_SUCCESS);
+ exit_SUCCESS();
exit(!received);
}
diff --git a/networking/inetd.c b/networking/inetd.c
index e5352a5..e71be51 100644
--- a/networking/inetd.c
+++ b/networking/inetd.c
@@ -1208,7 +1208,7 @@ static void clean_up_and_exit(int sig UNUSED_PARAM)
close(sep->se_fd);
}
remove_pidfile_std_path_and_ext("inetd");
- exit(EXIT_SUCCESS);
+ exit_SUCCESS();
}
int inetd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/networking/nc.c b/networking/nc.c
index d351bf7..ab13163 100644
--- a/networking/nc.c
+++ b/networking/nc.c
@@ -268,7 +268,7 @@ int nc_main(int argc, char **argv)
nread = safe_read(pfds[fdidx].fd, iobuf, COMMON_BUFSIZE);
if (fdidx != 0) {
if (nread < 1)
- exit(EXIT_SUCCESS);
+ exit_SUCCESS();
ofd = STDOUT_FILENO;
} else {
if (nread < 1) {
diff --git a/networking/telnetd.c b/networking/telnetd.c
index 581da19..0805e46 100644
--- a/networking/telnetd.c
+++ b/networking/telnetd.c
@@ -582,7 +582,7 @@ free_session(struct tsession *ts)
struct tsession *t;
if (option_mask32 & OPT_INETD)
- exit(EXIT_SUCCESS);
+ exit_SUCCESS();
/* Unlink this telnet session from the session list */
t = G.sessions;