diff options
Diffstat (limited to '')
-rw-r--r-- | bin/wake.c | 8 |
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; } |