diff options
author | Denis Vlasenko | 2006-11-22 23:22:06 +0000 |
---|---|---|
committer | Denis Vlasenko | 2006-11-22 23:22:06 +0000 |
commit | 48237b0c88343154d58854020c3a9c8b07c61b10 (patch) | |
tree | b36bc84f22dd797b45c8d665e50e2f6c690e1370 /networking/inetd.c | |
parent | b40bdb383a6b7a7f0fd36d0b1cc24deb42cd5f0d (diff) | |
download | busybox-48237b0c88343154d58854020c3a9c8b07c61b10.zip busybox-48237b0c88343154d58854020c3a9c8b07c61b10.tar.gz |
introduce setsockopt_reuseaddr(int fd), setsockopt_broadcast(int fd),
use them where appropriate. 200 bytes saved
Diffstat (limited to 'networking/inetd.c')
-rw-r--r-- | networking/inetd.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/networking/inetd.c b/networking/inetd.c index 75b2b14..ec7b2e8 100644 --- a/networking/inetd.c +++ b/networking/inetd.c @@ -419,7 +419,6 @@ static int bump_nofile (void) static void setup(servtab_t *sep) { - int on = 1; int r; sep->se_fd = socket(sep->se_family, sep->se_socktype, 0); @@ -427,11 +426,8 @@ static void setup(servtab_t *sep) bb_perror_msg("%s/%s: socket", sep->se_service, sep->se_proto); return; } -#define turnon(fd, opt) \ -setsockopt(fd, SOL_SOCKET, opt, (char *)&on, sizeof(on)) - if (turnon(sep->se_fd, SO_REUSEADDR) < 0) + if (setsockopt_reuseaddr(sep->se_fd) < 0) bb_perror_msg("setsockopt(SO_REUSEADDR)"); -#undef turnon #ifdef CONFIG_FEATURE_INETD_RPC if (isrpcservice(sep)) { |