From 50af1195042d6bf65bce4497bb0824daafcc8300 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Fri, 23 Feb 2018 17:51:22 -0500 Subject: Clean up wake --- bin/wake.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'bin') diff --git a/bin/wake.c b/bin/wake.c index a92cbd0c..c81c5ede 100644 --- a/bin/wake.c +++ b/bin/wake.c @@ -24,8 +24,7 @@ #include #define MAC 0x04, 0x7D, 0x7B, 0xD5, 0x6A, 0x53 - -const uint8_t payload[] = { +static const uint8_t payload[102] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, MAC, MAC, MAC, MAC, MAC, MAC, MAC, MAC, MAC, MAC, MAC, MAC, MAC, MAC, MAC, MAC, @@ -44,12 +43,11 @@ int main() { .sin_port = 9, .sin_addr.s_addr = INADDR_BROADCAST, }; - - ssize_t len = sendto( + ssize_t size = sendto( sock, payload, sizeof(payload), 0, (struct sockaddr *)&addr, sizeof(addr) ); - if (len < 0) err(EX_IOERR, "sendto"); + if (size < 0) err(EX_IOERR, "sendto"); return EX_OK; } -- cgit 1.4.1