diff options
author | Denys Vlasenko | 2022-01-04 23:31:58 +0100 |
---|---|---|
committer | Denys Vlasenko | 2022-01-04 23:31:58 +0100 |
commit | 31f45c1b369bee73843f7d791313423997618448 (patch) | |
tree | fa9f646727563392e34c9065d2cb3a46c5c731d0 /util-linux | |
parent | 286b33721d5f6afd615f752ea83bbd72658c6bb9 (diff) | |
download | busybox-31f45c1b369bee73843f7d791313423997618448.zip busybox-31f45c1b369bee73843f7d791313423997618448.tar.gz |
libbb: factor out fflush_stdout_and_exit(EXIT_SUCCESS)
function old new delta
fflush_stdout_and_exit_SUCCESS - 7 +7
xxd_main 890 888 -2
vlock_main 353 351 -2
uuencode_main 318 316 -2
uniq_main 427 425 -2
uname_main 250 248 -2
sort_main 853 851 -2
shuf_main 500 498 -2
route_main 238 236 -2
readlink_main 113 111 -2
nice_main 156 154 -2
last_main 957 955 -2
ipcs_main 960 958 -2
env_main 209 207 -2
chrt_main 464 462 -2
cal_main 921 919 -2
baseNUM_main 650 648 -2
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/16 up/down: 7/-32) Total: -25 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/cal.c | 2 | ||||
-rw-r--r-- | util-linux/chrt.c | 2 | ||||
-rw-r--r-- | util-linux/hexdump_xxd.c | 2 | ||||
-rw-r--r-- | util-linux/ipcs.c | 8 | ||||
-rw-r--r-- | util-linux/last.c | 2 | ||||
-rw-r--r-- | util-linux/last_fancy.c | 2 |
6 files changed, 9 insertions, 9 deletions
diff --git a/util-linux/cal.c b/util-linux/cal.c index 6ba6ebf..522ab34 100644 --- a/util-linux/cal.c +++ b/util-linux/cal.c @@ -233,7 +233,7 @@ int cal_main(int argc UNUSED_PARAM, char **argv) } } - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } /* diff --git a/util-linux/chrt.c b/util-linux/chrt.c index 6799abb..be96fa4 100644 --- a/util-linux/chrt.c +++ b/util-linux/chrt.c @@ -110,7 +110,7 @@ int chrt_main(int argc UNUSED_PARAM, char **argv) show_min_max(SCHED_RR); show_min_max(SCHED_BATCH); show_min_max(SCHED_IDLE); - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } //if (opt & OPT_r) // policy = SCHED_RR; - default, already set diff --git a/util-linux/hexdump_xxd.c b/util-linux/hexdump_xxd.c index 76dada9..4372ac7 100644 --- a/util-linux/hexdump_xxd.c +++ b/util-linux/hexdump_xxd.c @@ -150,7 +150,7 @@ static void reverse(unsigned opt, const char *filename) free(buf); } //fclose(fp); - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } static void print_C_style(const char *p, const char *hdr) diff --git a/util-linux/ipcs.c b/util-linux/ipcs.c index ef2529c..5973cbf 100644 --- a/util-linux/ipcs.c +++ b/util-linux/ipcs.c @@ -600,15 +600,15 @@ int ipcs_main(int argc UNUSED_PARAM, char **argv) id = xatoi(opt_i); if (opt & flag_shm) { print_shm(id); - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } if (opt & flag_sem) { print_sem(id); - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } if (opt & flag_msg) { print_msg(id); - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } bb_show_usage(); } @@ -633,5 +633,5 @@ int ipcs_main(int argc UNUSED_PARAM, char **argv) do_sem(format); bb_putchar('\n'); } - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } diff --git a/util-linux/last.c b/util-linux/last.c index 24ce7a8..63751ca 100644 --- a/util-linux/last.c +++ b/util-linux/last.c @@ -162,5 +162,5 @@ int last_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) xlseek(file, pos, SEEK_SET); } - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } diff --git a/util-linux/last_fancy.c b/util-linux/last_fancy.c index e56e0ba..6482362 100644 --- a/util-linux/last_fancy.c +++ b/util-linux/last_fancy.c @@ -296,5 +296,5 @@ int last_main(int argc UNUSED_PARAM, char **argv) if (ENABLE_FEATURE_CLEAN_UP) close(file); - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } |