summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
Diffstat (limited to 'networking')
-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));