summaryrefslogtreecommitdiff
path: root/networking/nc.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-12-23 02:48:44 +0000
committerDenis Vlasenko2006-12-23 02:48:44 +0000
commit1dc1b37b337030807d7b35b415373593e3f72dda (patch)
tree84b5f0ae68c3e1f1450b81af96b25c9a74aaf049 /networking/nc.c
parent7e46cf748ead14b4060f0825762fb6393cf89a91 (diff)
downloadbusybox-1dc1b37b337030807d7b35b415373593e3f72dda.zip
busybox-1dc1b37b337030807d7b35b415373593e3f72dda.tar.gz
use xbind, xconnect where appropriate.
small edits to arping
Diffstat (limited to 'networking/nc.c')
-rw-r--r--networking/nc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/networking/nc.c b/networking/nc.c
index b2a4596..1419609 100644
--- a/networking/nc.c
+++ b/networking/nc.c
@@ -120,8 +120,7 @@ int nc_main(int argc, char **argv)
address.sin_addr = *(struct in_addr *) *hostinfo->h_addr_list;
address.sin_port = bb_lookup_port(argv[1], "tcp", 0);
- if (connect(sfd, (struct sockaddr *) &address, sizeof(address)) < 0)
- bb_perror_msg_and_die("connect");
+ xconnect(sfd, (struct sockaddr *) &address, sizeof(address));
cfd = sfd;
}
}