diff options
author | Denys Vlasenko | 2018-02-11 14:55:46 +0100 |
---|---|---|
committer | Denys Vlasenko | 2018-02-11 14:55:46 +0100 |
commit | ba3b9dbf065438402d89655d7baefb0ccc6f0663 (patch) | |
tree | 4669edd0fb031940a794eaf8942bdbf314efea2e /networking/inetd.c | |
parent | d3162773d5c722cc1f5c5b1ea5171c8d3c208135 (diff) | |
download | busybox-ba3b9dbf065438402d89655d7baefb0ccc6f0663.zip busybox-ba3b9dbf065438402d89655d7baefb0ccc6f0663.tar.gz |
libbb: introduce and use bb_getsockname()
function old new delta
bb_getsockname - 18 +18
xrtnl_open 88 83 -5
do_iplink 1216 1209 -7
arping_main 1686 1668 -18
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 0/3 up/down: 18/-30) Total: -12 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/inetd.c')
-rw-r--r-- | networking/inetd.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/networking/inetd.c b/networking/inetd.c index 4dfa008..6843845 100644 --- a/networking/inetd.c +++ b/networking/inetd.c @@ -497,10 +497,9 @@ static void register_rpc(servtab_t *sep) { int n; struct sockaddr_in ir_sin; - socklen_t size; - size = sizeof(ir_sin); - if (getsockname(sep->se_fd, (struct sockaddr *) &ir_sin, &size) < 0) { + if (bb_getsockname(sep->se_fd, (struct sockaddr *) &ir_sin, sizeof(ir_sin)) < 0) { +//TODO: verify that such failure is even possible in Linux kernel bb_perror_msg("getsockname"); return; } |