diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2015-08-24 19:48:03 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2015-08-24 20:00:17 +0200 |
commit | c52cbea2bba6582b44facb424a15dc544b54fb28 (patch) | |
tree | b048b3f7832621a16ed9ba2441756e2fc69ee316 /networking/ntpd.c | |
parent | 2db782bc7be70c34a756e2bc6d4a53e8f47bab20 (diff) | |
download | busybox-w32-c52cbea2bba6582b44facb424a15dc544b54fb28.tar.gz busybox-w32-c52cbea2bba6582b44facb424a15dc544b54fb28.tar.bz2 busybox-w32-c52cbea2bba6582b44facb424a15dc544b54fb28.zip |
libbb: add setsockopt_foo helpers
function old new delta
setsockopt_int - 23 +23
do_load 918 934 +16
setsockopt_SOL_SOCKET_int - 14 +14
setsockopt_keepalive - 10 +10
setsockopt_SOL_SOCKET_1 - 10 +10
buffer_fill_and_print 169 178 +9
setsockopt_1 - 8 +8
nfsmount 3560 3566 +6
redirect 1277 1282 +5
tcpudpsvd_main 1782 1786 +4
d6_send_kernel_packet 272 275 +3
i2cget_main 380 382 +2
ed_main 2544 2545 +1
scan_recursive 380 378 -2
nbdclient_main 492 490 -2
hash_find 235 233 -2
cmdputs 334 332 -2
parse_command 1443 1440 -3
static.two 4 - -4
ntpd_main 1039 1035 -4
const_int_1 4 - -4
const_IPTOS_LOWDELAY 4 - -4
RCVBUF 4 - -4
ntp_init 474 469 -5
change_listen_mode 316 310 -6
uevent_main 416 409 -7
arping_main 1697 1690 -7
telnet_main 1612 1603 -9
socket_want_pktinfo 42 33 -9
setsockopt_reuseaddr 21 10 -11
setsockopt_broadcast 21 10 -11
httpd_main 772 757 -15
get_remote_transfer_fd 109 94 -15
make_new_session 503 487 -16
ftpd_main 2177 2160 -17
read_bunzip 1896 1866 -30
common_traceroute_main 4099 4058 -41
common_ping_main 1836 1783 -53
------------------------------------------------------------------------------
(add/remove: 5/4 grow/shrink: 8/21 up/down: 111/-283) Total: -172 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/ntpd.c')
-rw-r--r-- | networking/ntpd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/networking/ntpd.c b/networking/ntpd.c index b5120a70d..9732c9b1a 100644 --- a/networking/ntpd.c +++ b/networking/ntpd.c | |||
@@ -405,8 +405,6 @@ struct globals { | |||
405 | }; | 405 | }; |
406 | #define G (*ptr_to_globals) | 406 | #define G (*ptr_to_globals) |
407 | 407 | ||
408 | static const int const_IPTOS_LOWDELAY = IPTOS_LOWDELAY; | ||
409 | |||
410 | 408 | ||
411 | #define VERB1 if (MAX_VERBOSE && G.verbose) | 409 | #define VERB1 if (MAX_VERBOSE && G.verbose) |
412 | #define VERB2 if (MAX_VERBOSE >= 2 && G.verbose >= 2) | 410 | #define VERB2 if (MAX_VERBOSE >= 2 && G.verbose >= 2) |
@@ -837,7 +835,7 @@ send_query_to_peer(peer_t *p) | |||
837 | #if ENABLE_FEATURE_IPV6 | 835 | #if ENABLE_FEATURE_IPV6 |
838 | if (family == AF_INET) | 836 | if (family == AF_INET) |
839 | #endif | 837 | #endif |
840 | setsockopt(fd, IPPROTO_IP, IP_TOS, &const_IPTOS_LOWDELAY, sizeof(const_IPTOS_LOWDELAY)); | 838 | setsockopt_int(fd, IPPROTO_IP, IP_TOS, IPTOS_LOWDELAY); |
841 | free(local_lsa); | 839 | free(local_lsa); |
842 | } | 840 | } |
843 | 841 | ||
@@ -2186,7 +2184,7 @@ static NOINLINE void ntp_init(char **argv) | |||
2186 | xfunc_die(); | 2184 | xfunc_die(); |
2187 | } | 2185 | } |
2188 | socket_want_pktinfo(G_listen_fd); | 2186 | socket_want_pktinfo(G_listen_fd); |
2189 | setsockopt(G_listen_fd, IPPROTO_IP, IP_TOS, &const_IPTOS_LOWDELAY, sizeof(const_IPTOS_LOWDELAY)); | 2187 | setsockopt_int(G_listen_fd, IPPROTO_IP, IP_TOS, IPTOS_LOWDELAY); |
2190 | } | 2188 | } |
2191 | #endif | 2189 | #endif |
2192 | if (!(opts & OPT_n)) { | 2190 | if (!(opts & OPT_n)) { |