use xbind, xconnect where appropriate.

small edits to arping
This commit is contained in:
Denis Vlasenko
2006-12-23 02:48:44 +00:00
parent 7e46cf748e
commit 1dc1b37b33
4 changed files with 53 additions and 84 deletions

View File

@ -54,7 +54,8 @@ void xconnect(int s, const struct sockaddr *s_addr, socklen_t addrlen)
if (connect(s, s_addr, addrlen) < 0) {
if (ENABLE_FEATURE_CLEAN_UP) close(s);
if (s_addr->sa_family == AF_INET)
bb_perror_msg_and_die("cannot connect to remote host (%s)",
bb_perror_msg_and_die("%s (%s)",
"cannot connect to remote host",
inet_ntoa(((struct sockaddr_in *)s_addr)->sin_addr));
bb_perror_msg_and_die("cannot connect to remote host");
}