From: Martin Mares Date: Fri, 31 Dec 2010 15:05:04 +0000 (+0100) Subject: Use socklen_t properly X-Git-Tag: v1.13~23 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=9a8b0b705ffd3177d0ce5c3c6deb5c3d5b8692ea;p=nwho.git Use socklen_t properly Squashes a compiler warning about different signedness. --- 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);