diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2022-01-05 22:16:06 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2022-01-05 22:16:06 +0100 |
commit | db5546ca101846f18294a43b39883bc4ff53613a (patch) | |
tree | f8bb8a4835b70f4693dcf83edfa432c21d0ee77f /miscutils/devfsd.c | |
parent | 076f5e064fa7b6cc2c03b030abcf2cbd60514180 (diff) | |
download | busybox-w32-db5546ca101846f18294a43b39883bc4ff53613a.tar.gz busybox-w32-db5546ca101846f18294a43b39883bc4ff53613a.tar.bz2 busybox-w32-db5546ca101846f18294a43b39883bc4ff53613a.zip |
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 'miscutils/devfsd.c')
-rw-r--r-- | miscutils/devfsd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c index e5bb8a2d8..839d00fd0 100644 --- a/miscutils/devfsd.c +++ b/miscutils/devfsd.c | |||
@@ -453,7 +453,7 @@ int devfsd_main(int argc, char **argv) | |||
453 | DEVFSD_PROTOCOL_REVISION_DAEMON, bb_msg_proto_rev, proto_rev); | 453 | DEVFSD_PROTOCOL_REVISION_DAEMON, bb_msg_proto_rev, proto_rev); |
454 | if (DEVFSD_PROTOCOL_REVISION_DAEMON != proto_rev) | 454 | if (DEVFSD_PROTOCOL_REVISION_DAEMON != proto_rev) |
455 | bb_error_msg_and_die("%s mismatch!", bb_msg_proto_rev); | 455 | bb_error_msg_and_die("%s mismatch!", bb_msg_proto_rev); |
456 | exit(EXIT_SUCCESS); /* -v */ | 456 | exit_SUCCESS(); /* -v */ |
457 | } | 457 | } |
458 | /* Tell kernel we are special(i.e. we get to see hidden entries) */ | 458 | /* Tell kernel we are special(i.e. we get to see hidden entries) */ |
459 | xioctl(fd, DEVFSDIOC_SET_EVENT_MASK, 0); | 459 | xioctl(fd, DEVFSDIOC_SET_EVENT_MASK, 0); |
@@ -474,7 +474,7 @@ int devfsd_main(int argc, char **argv) | |||
474 | dir_operation(SERVICE, mount_point, 0, NULL); | 474 | dir_operation(SERVICE, mount_point, 0, NULL); |
475 | 475 | ||
476 | if (ENABLE_DEVFSD_FG_NP && no_polling) | 476 | if (ENABLE_DEVFSD_FG_NP && no_polling) |
477 | exit(EXIT_SUCCESS); | 477 | exit_SUCCESS(); |
478 | 478 | ||
479 | if (ENABLE_DEVFSD_VERBOSE || ENABLE_DEBUG) | 479 | if (ENABLE_DEVFSD_VERBOSE || ENABLE_DEBUG) |
480 | logmode = LOGMODE_BOTH; | 480 | logmode = LOGMODE_BOTH; |