From 27af5a0dd34b1b392aa69b548e18935aafe66e5f Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sun, 3 Sep 2006 12:21:59 +0000 Subject: replacing func() with xfunc() where appropriate --- networking/arping.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'networking/arping.c') diff --git a/networking/arping.c b/networking/arping.c index 5665ddb..08b2727 100644 --- a/networking/arping.c +++ b/networking/arping.c @@ -259,7 +259,7 @@ int arping_main(int argc, char **argv) char *source = NULL; char *target; - s = socket(PF_PACKET, SOCK_DGRAM, 0); + s = xsocket(PF_PACKET, SOCK_DGRAM, 0); ifindex = errno; // Drop suid root privileges @@ -346,11 +346,8 @@ int arping_main(int argc, char **argv) if (!(cfg&dad) || src.s_addr) { struct sockaddr_in saddr; - int probe_fd = socket(AF_INET, SOCK_DGRAM, 0); /* maybe use bb_xsocket? */ + int probe_fd = xsocket(AF_INET, SOCK_DGRAM, 0); - if (probe_fd < 0) { - bb_error_msg_and_die("socket"); - } if (device) { if (setsockopt (probe_fd, SOL_SOCKET, SO_BINDTODEVICE, device, -- cgit v1.1