summaryrefslogtreecommitdiff
path: root/networking/ping.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-09-02 17:53:16 +0000
committerDenis Vlasenko2006-09-02 17:53:16 +0000
commitbcf4908e714644add18fad1614e8b0dea071960d (patch)
tree83aa66bd5faa69e2eba3391d82018032205ff51b /networking/ping.c
parente0b7f71d26d224bd8304d9dfcac3fe9b9d862cd2 (diff)
downloadbusybox-bcf4908e714644add18fad1614e8b0dea071960d.zip
busybox-bcf4908e714644add18fad1614e8b0dea071960d.tar.gz
ping: bind -> xbind
Diffstat (limited to 'networking/ping.c')
-rw-r--r--networking/ping.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/networking/ping.c b/networking/ping.c
index 4269eaa..a81472f 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -330,8 +330,7 @@ static void ping(const char *host)
pingsock = create_icmp_socket();
if (sourceaddr.sin_addr.s_addr) {
- if (bind(pingsock, (struct sockaddr*)&sourceaddr, sizeof(sourceaddr)) == -1)
- bb_error_msg_and_die("could not bind to address");
+ xbind(pingsock, (struct sockaddr*)&sourceaddr, sizeof(sourceaddr));
}
memset(&pingaddr, 0, sizeof(struct sockaddr_in));