From 9a8b0b705ffd3177d0ce5c3c6deb5c3d5b8692ea Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 31 Dec 2010 16:05:04 +0100 Subject: [PATCH] Use socklen_t properly Squashes a compiler warning about different signedness. --- nwhod.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nwhod.c b/nwhod.c index f432d00..c6ebade 100644 --- a/nwhod.c +++ b/nwhod.c @@ -199,16 +199,16 @@ is_valid(u32 ipa) static void receive(void) { - int r, al; + int r; struct nwho_pkt pkt; struct sockaddr_in sa; + socklen_t al = sizeof(sa); int n = sizeof(struct nwho_pkt) - MAX_USERS * sizeof(struct userinfo); struct hostrec *e; struct hostent *h; char *c; alarm(DEFAULT_PRUNE_TIME); - al = sizeof(sa); r = recvfrom(sock, &pkt, sizeof(pkt), 0, (struct sockaddr *) &sa, &al); alarm(0); now = time(NULL); -- 2.39.2