From 25537d30d36b01ec1f28725defeab6e4f98c7c5b Mon Sep 17 00:00:00 2001 From: Mukund Sivaraman Date: Wed, 12 Mar 2008 15:40:12 -0700 Subject: [PATCH] Corrected datatype of namelen to fix compiler warning --- src/sock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sock.c b/src/sock.c index 5801a28..d5e8f59 100644 --- a/src/sock.c +++ b/src/sock.c @@ -155,7 +155,7 @@ int listen_sock(uint16_t port, socklen_t *addrlen) char *getpeer_ip(int fd, char *ipaddr) { struct sockaddr_in name; - size_t namelen = sizeof(name); + socklen_t namelen = sizeof(name); assert(fd >= 0); assert(ipaddr != NULL); @@ -183,7 +183,7 @@ char *getpeer_ip(int fd, char *ipaddr) char *getpeer_string(int fd, char *string) { struct sockaddr_in name; - size_t namelen = sizeof(name); + socklen_t namelen = sizeof(name); struct hostent *peername; assert(fd >= 0);