diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2023-06-15 11:55:56 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2023-06-15 11:55:56 +0200 |
commit | 648f506949ded749e28186d0092b6e42085c897b (patch) | |
tree | 049c72bc8149f41fc617d00f7d32f1d6384f8e2f /util-linux | |
parent | 61a4959251667751e424e600c6cb75de39d6b1c3 (diff) | |
download | busybox-w32-648f506949ded749e28186d0092b6e42085c897b.tar.gz busybox-w32-648f506949ded749e28186d0092b6e42085c897b.tar.bz2 busybox-w32-648f506949ded749e28186d0092b6e42085c897b.zip |
libbb: code shrink: introduce and use [_]exit_FAILURE()
function old new delta
exit_FAILURE - 7 +7
_exit_FAILURE - 7 +7
run 198 199 +1
restore_state_and_exit 114 115 +1
xbsd_write_bootstrap 399 397 -2
vfork_compressor 209 207 -2
sig_handler 12 10 -2
serial_ctl 154 152 -2
parse_args 1169 1167 -2
onintr 21 19 -2
make_new_session 493 491 -2
login_main 988 986 -2
gotsig 35 33 -2
do_iplink 1315 1313 -2
addgroup_main 397 395 -2
inetd_main 1911 1908 -3
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 2/12 up/down: 16/-25) Total: -9 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/fdisk_osf.c | 5 | ||||
-rw-r--r-- | util-linux/more.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/util-linux/fdisk_osf.c b/util-linux/fdisk_osf.c index 6c66c130d..049f0b169 100644 --- a/util-linux/fdisk_osf.c +++ b/util-linux/fdisk_osf.c | |||
@@ -746,11 +746,12 @@ xbsd_write_bootstrap(void) | |||
746 | return; | 746 | return; |
747 | 747 | ||
748 | e = d + sizeof(struct xbsd_disklabel); | 748 | e = d + sizeof(struct xbsd_disklabel); |
749 | for (p = d; p < e; p++) | 749 | for (p = d; p < e; p++) { |
750 | if (*p) { | 750 | if (*p) { |
751 | printf("Bootstrap overlaps with disk label!\n"); | 751 | printf("Bootstrap overlaps with disk label!\n"); |
752 | exit(EXIT_FAILURE); | 752 | exit_FAILURE(); |
753 | } | 753 | } |
754 | } | ||
754 | 755 | ||
755 | memmove(d, &dl, sizeof(struct xbsd_disklabel)); | 756 | memmove(d, &dl, sizeof(struct xbsd_disklabel)); |
756 | 757 | ||
diff --git a/util-linux/more.c b/util-linux/more.c index a830dcbc1..352a3b6cf 100644 --- a/util-linux/more.c +++ b/util-linux/more.c | |||
@@ -65,7 +65,7 @@ static void gotsig(int sig UNUSED_PARAM) | |||
65 | * therefore it is safe in signal handler */ | 65 | * therefore it is safe in signal handler */ |
66 | bb_putchar_stderr('\n'); | 66 | bb_putchar_stderr('\n'); |
67 | tcsetattr_tty_TCSANOW(&G.initial_settings); | 67 | tcsetattr_tty_TCSANOW(&G.initial_settings); |
68 | _exit(EXIT_FAILURE); | 68 | _exit_FAILURE(); |
69 | } | 69 | } |
70 | 70 | ||
71 | #define CONVERTED_TAB_SIZE 8 | 71 | #define CONVERTED_TAB_SIZE 8 |