aboutsummaryrefslogtreecommitdiff
path: root/libbb/xconnect.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-01-22 14:12:08 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-01-22 14:12:08 +0000
commit703e20235aa0624d3ff4335c1e86edaa6e21efe2 (patch)
tree49e8451efad93b75c0be74ee553d3b3f8c04a25d /libbb/xconnect.c
parent6cd2d2bcba37a13d0d73326dd7bca64bbccce4f8 (diff)
downloadbusybox-w32-703e20235aa0624d3ff4335c1e86edaa6e21efe2.tar.gz
busybox-w32-703e20235aa0624d3ff4335c1e86edaa6e21efe2.tar.bz2
busybox-w32-703e20235aa0624d3ff4335c1e86edaa6e21efe2.zip
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.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libbb/xconnect.c b/libbb/xconnect.c
index 62cab95a1..0addda157 100644
--- a/libbb/xconnect.c
+++ b/libbb/xconnect.c
@@ -9,14 +9,13 @@
9#include <netinet/in.h> 9#include <netinet/in.h>
10#include "libbb.h" 10#include "libbb.h"
11 11
12static const int one = 1;
13int setsockopt_reuseaddr(int fd) 12int setsockopt_reuseaddr(int fd)
14{ 13{
15 return setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)); 14 return setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &const_int_1, sizeof(const_int_1));
16} 15}
17int setsockopt_broadcast(int fd) 16int setsockopt_broadcast(int fd)
18{ 17{
19 return setsockopt(fd, SOL_SOCKET, SO_BROADCAST, &one, sizeof(one)); 18 return setsockopt(fd, SOL_SOCKET, SO_BROADCAST, &const_int_1, sizeof(const_int_1));
20} 19}
21 20
22void xconnect(int s, const struct sockaddr *s_addr, socklen_t addrlen) 21void xconnect(int s, const struct sockaddr *s_addr, socklen_t addrlen)