ping: bind -> xbind
authorDenis Vlasenko <vda.linux@googlemail.com>
Sat, 2 Sep 2006 17:53:16 +0000 (17:53 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Sat, 2 Sep 2006 17:53:16 +0000 (17:53 -0000)
networking/ping.c

index 4269eaa6fbd4164f2d6a47af2af0ac95e5acb03a..a81472f9672bf3ffeb4c7b7bb10443c3a29250c9 100644 (file)
@@ -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));