ping: bind -> xbind

This commit is contained in:
Denis Vlasenko 2006-09-02 17:53:16 +00:00
parent e0b7f71d26
commit bcf4908e71

View 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));