summaryrefslogtreecommitdiff
path: root/networking/arping.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-01-22 14:12:08 +0000
committerDenis Vlasenko2007-01-22 14:12:08 +0000
commit703e20235aa0624d3ff4335c1e86edaa6e21efe2 (patch)
tree49e8451efad93b75c0be74ee553d3b3f8c04a25d /networking/arping.c
parent6cd2d2bcba37a13d0d73326dd7bca64bbccce4f8 (diff)
downloadbusybox-703e20235aa0624d3ff4335c1e86edaa6e21efe2.zip
busybox-703e20235aa0624d3ff4335c1e86edaa6e21efe2.tar.gz
cleanups: unnecessary casts, unified const_1, eliminate cross-.c file
prototypes (heresy!), add spaces in places like "flags&NETSTAT_CONNECTED", removed unused #defines, #ifdef -> #if, use uint32_t for ipv4 addrs.
Diffstat (limited to 'networking/arping.c')
-rw-r--r--networking/arping.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/networking/arping.c b/networking/arping.c
index 58d5b3b..55b2787 100644
--- a/networking/arping.c
+++ b/networking/arping.c
@@ -335,13 +335,12 @@ int arping_main(int argc, char **argv)
saddr.sin_addr = src;
xbind(probe_fd, (struct sockaddr *) &saddr, sizeof(saddr));
} else if (!(cfg & dad)) {
- static const int on = 1;
socklen_t alen = sizeof(saddr);
saddr.sin_port = htons(1025);
saddr.sin_addr = dst;
- if (setsockopt(probe_fd, SOL_SOCKET, SO_DONTROUTE, (char *) &on, sizeof(on)) == -1)
+ if (setsockopt(probe_fd, SOL_SOCKET, SO_DONTROUTE, &const_int_1, sizeof(const_int_1)) == -1)
bb_perror_msg("warning: setsockopt(SO_DONTROUTE)");
xconnect(probe_fd, (struct sockaddr *) &saddr, sizeof(saddr));
if (getsockname(probe_fd, (struct sockaddr *) &saddr, &alen) == -1) {