From 48237b0c88343154d58854020c3a9c8b07c61b10 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Wed, 22 Nov 2006 23:22:06 +0000 Subject: introduce setsockopt_reuseaddr(int fd), setsockopt_broadcast(int fd), use them where appropriate. 200 bytes saved --- networking/ether-wake.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'networking/ether-wake.c') 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[]) /* This is necessary for broadcasts to work */ if (flags /*& 1 [OPT_BROADCAST]*/) { - int one = 1; - if (setsockopt(s, SOL_SOCKET, SO_BROADCAST, (void *)&one, sizeof(one)) < 0) + if (setsockopt_broadcast(s) < 0) bb_perror_msg("SO_BROADCAST"); } -- cgit v1.2.3