summaryrefslogtreecommitdiff
path: root/networking/libiproute/iplink.c
diff options
context:
space:
mode:
authorDenis Vlasenko2009-04-21 23:48:38 +0000
committerDenis Vlasenko2009-04-21 23:48:38 +0000
commita771e7c0057d0f506f8cdf67be39268e1c9f0735 (patch)
treebef7afb1304b3510d4857148a50e162a0578c363 /networking/libiproute/iplink.c
parente6b10ef0a7a5761c4cd0fe5f48bad953aa92240e (diff)
downloadbusybox-a771e7c0057d0f506f8cdf67be39268e1c9f0735.zip
busybox-a771e7c0057d0f506f8cdf67be39268e1c9f0735.tar.gz
*: remove check for errors on getsockaddr in cases we know they can't happen
libbb: make get_sock_lsa use only one getsockaddr syscall, not two function old new delta get_sock_lsa 72 101 +29 do_iplink 1151 1137 -14 arping_main 1585 1569 -16 dolisten 789 755 -34 xrtnl_open 161 94 -67
Diffstat (limited to 'networking/libiproute/iplink.c')
-rw-r--r--networking/libiproute/iplink.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c
index 1e7ee07..de7d640 100644
--- a/networking/libiproute/iplink.c
+++ b/networking/libiproute/iplink.c
@@ -112,11 +112,11 @@ static int get_address(char *dev, int *htype)
me.sll_ifindex = ifr.ifr_ifindex;
me.sll_protocol = htons(ETH_P_LOOP);
xbind(s, (struct sockaddr*)&me, sizeof(me));
-
alen = sizeof(me);
- if (getsockname(s, (struct sockaddr*)&me, &alen) == -1) {
- bb_perror_msg_and_die("getsockname");
- }
+ getsockname(s, (struct sockaddr*)&me, &alen);
+ //never happens:
+ //if (getsockname(s, (struct sockaddr*)&me, &alen) == -1)
+ // bb_perror_msg_and_die("getsockname");
close(s);
*htype = me.sll_hatype;
return me.sll_halen;