sdhcp

simple dhcp client
git clone git://git.2f30.org/sdhcp.git
Log | Files | Refs | LICENSE

commit 875f71857e85ec86a1903f4622a1de62d4882800
parent b9a0a3e1c7b194f9c82015a03cfe05fb4286d98f
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Fri Apr 25 22:16:36 +0200

fix warning with -Wextra

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>

Diffstat:
sdhcp.c | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/sdhcp.c b/sdhcp.c @@ -286,7 +286,11 @@ static int dhcprecv(void) { unsigned char type; - struct pollfd pfd = {sock, POLLIN}; + struct pollfd pfd; + + memset(&pfd, 0, sizeof(pfd)); + pfd.fd = sock; + pfd.events = POLLIN; memset(&bp, 0, sizeof bp); if(poll(&pfd, 1, -1) == -1) {