diff options
author | Denis Vlasenko | 2009-04-21 23:48:38 +0000 |
---|---|---|
committer | Denis Vlasenko | 2009-04-21 23:48:38 +0000 |
commit | a771e7c0057d0f506f8cdf67be39268e1c9f0735 (patch) | |
tree | bef7afb1304b3510d4857148a50e162a0578c363 /networking/nc_bloaty.c | |
parent | e6b10ef0a7a5761c4cd0fe5f48bad953aa92240e (diff) | |
download | busybox-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/nc_bloaty.c')
-rw-r--r-- | networking/nc_bloaty.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/networking/nc_bloaty.c b/networking/nc_bloaty.c index 47940e9..efe831e 100644 --- a/networking/nc_bloaty.c +++ b/networking/nc_bloaty.c @@ -278,9 +278,9 @@ static void dolisten(void) random unknown port is probably not very useful without "netstat". */ if (o_verbose) { char *addr; - rr = getsockname(netfd, &ouraddr->u.sa, &ouraddr->len); - if (rr < 0) - bb_perror_msg_and_die("getsockname after bind"); + getsockname(netfd, &ouraddr->u.sa, &ouraddr->len); + //if (rr < 0) + // bb_perror_msg_and_die("getsockname after bind"); addr = xmalloc_sockaddr2dotted(&ouraddr->u.sa); fprintf(stderr, "listening on %s ...\n", addr); free(addr); @@ -359,9 +359,9 @@ create new one, and bind() it. TODO */ doing a listen-on-any on a multihomed machine. This allows one to offer different services via different alias addresses, such as the "virtual web site" hack. */ - rr = getsockname(netfd, &ouraddr->u.sa, &ouraddr->len); - if (rr < 0) - bb_perror_msg_and_die("getsockname after accept"); + getsockname(netfd, &ouraddr->u.sa, &ouraddr->len); + //if (rr < 0) + // bb_perror_msg_and_die("getsockname after accept"); } if (o_verbose) { |