diff options
author | Denis Vlasenko | 2007-01-22 14:12:08 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-01-22 14:12:08 +0000 |
commit | 703e20235aa0624d3ff4335c1e86edaa6e21efe2 (patch) | |
tree | 49e8451efad93b75c0be74ee553d3b3f8c04a25d /libbb/xconnect.c | |
parent | 6cd2d2bcba37a13d0d73326dd7bca64bbccce4f8 (diff) | |
download | busybox-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 'libbb/xconnect.c')
-rw-r--r-- | libbb/xconnect.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libbb/xconnect.c b/libbb/xconnect.c index 62cab95..0addda1 100644 --- a/libbb/xconnect.c +++ b/libbb/xconnect.c @@ -9,14 +9,13 @@ #include <netinet/in.h> #include "libbb.h" -static const int one = 1; int setsockopt_reuseaddr(int fd) { - return setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)); + return setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &const_int_1, sizeof(const_int_1)); } int setsockopt_broadcast(int fd) { - return setsockopt(fd, SOL_SOCKET, SO_BROADCAST, &one, sizeof(one)); + return setsockopt(fd, SOL_SOCKET, SO_BROADCAST, &const_int_1, sizeof(const_int_1)); } void xconnect(int s, const struct sockaddr *s_addr, socklen_t addrlen) |