diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-22 23:22:06 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-22 23:22:06 +0000 |
commit | 48237b0c88343154d58854020c3a9c8b07c61b10 (patch) | |
tree | b36bc84f22dd797b45c8d665e50e2f6c690e1370 /networking/ether-wake.c | |
parent | b40bdb383a6b7a7f0fd36d0b1cc24deb42cd5f0d (diff) | |
download | busybox-w32-48237b0c88343154d58854020c3a9c8b07c61b10.tar.gz busybox-w32-48237b0c88343154d58854020c3a9c8b07c61b10.tar.bz2 busybox-w32-48237b0c88343154d58854020c3a9c8b07c61b10.zip |
introduce setsockopt_reuseaddr(int fd), setsockopt_broadcast(int fd),
use them where appropriate. 200 bytes saved
Diffstat (limited to 'networking/ether-wake.c')
-rw-r--r-- | networking/ether-wake.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/networking/ether-wake.c b/networking/ether-wake.c index cc2fb62a3..f870f6a5f 100644 --- a/networking/ether-wake.c +++ b/networking/ether-wake.c | |||
@@ -175,8 +175,7 @@ int ether_wake_main(int argc, char *argv[]) | |||
175 | 175 | ||
176 | /* This is necessary for broadcasts to work */ | 176 | /* This is necessary for broadcasts to work */ |
177 | if (flags /*& 1 [OPT_BROADCAST]*/) { | 177 | if (flags /*& 1 [OPT_BROADCAST]*/) { |
178 | int one = 1; | 178 | if (setsockopt_broadcast(s) < 0) |
179 | if (setsockopt(s, SOL_SOCKET, SO_BROADCAST, (void *)&one, sizeof(one)) < 0) | ||
180 | bb_perror_msg("SO_BROADCAST"); | 179 | bb_perror_msg("SO_BROADCAST"); |
181 | } | 180 | } |
182 | 181 | ||