summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
authorJune McEnroe <programble@gmail.com>2018-02-23 17:51:22 -0500
committerJune McEnroe <programble@gmail.com>2018-02-23 17:51:22 -0500
commit50af1195042d6bf65bce4497bb0824daafcc8300 (patch)
tree6157a9433720dfe260a1365d1a16b3d8618c2a4a /bin
parentAvoid unnecessary FDs in errors (diff)
downloadsrc-50af1195042d6bf65bce4497bb0824daafcc8300.tar.gz
src-50af1195042d6bf65bce4497bb0824daafcc8300.zip
Clean up wake
Diffstat (limited to 'bin')
-rw-r--r--bin/wake.c8
1 files changed, 3 insertions, 5 deletions
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 <sysexits.h>
 
 #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;
 }