fix warning with -Wextra - sdhcp - simple dhcp client | |
git clone git://git.codemadness.org/sdhcp | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 875f71857e85ec86a1903f4622a1de62d4882800 | |
parent b9a0a3e1c7b194f9c82015a03cfe05fb4286d98f | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Fri, 25 Apr 2014 22:16:36 +0200 | |
fix warning with -Wextra | |
Signed-off-by: Hiltjo Posthuma <[email protected]> | |
Diffstat: | |
M 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) { |