From c52cbea2bba6582b44facb424a15dc544b54fb28 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 24 Aug 2015 19:48:03 +0200 Subject: 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 --- networking/nbd-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'networking/nbd-client.c') diff --git a/networking/nbd-client.c b/networking/nbd-client.c index cadda52..a601430 100644 --- a/networking/nbd-client.c +++ b/networking/nbd-client.c @@ -83,7 +83,7 @@ int nbdclient_main(int argc, char **argv) // Find and connect to server sock = create_and_connect_stream_or_die(host, xatou16(port)); - setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &const_int_1, sizeof(const_int_1)); + setsockopt_1(sock, IPPROTO_TCP, TCP_NODELAY); // Log on to the server xread(sock, &nbd_header, 8+8+8+4 + 124); -- cgit v1.1