diff options
author | Mukund Sivaraman <muks@banu.com> | 2008-03-08 17:41:08 -0800 |
---|---|---|
committer | Mukund Sivaraman <muks@banu.com> | 2008-03-13 15:09:21 -0700 |
commit | 8848b647d79e9967ae31f09bacde8c00b43aac7a (patch) | |
tree | 4c3400be2a3ef7571e5e3392d8d4a52199164d5a /src | |
parent | 0ac647ab98c980af0fdd9546e069de13f3705c19 (diff) | |
download | tinyproxy-8848b647d79e9967ae31f09bacde8c00b43aac7a.tar.gz tinyproxy-8848b647d79e9967ae31f09bacde8c00b43aac7a.zip |
Corrected datatype of salen to fix compiler warning
Diffstat (limited to 'src')
-rw-r--r-- | src/sock.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -236,7 +236,7 @@ int getpeer_information(int fd, char *ipaddr, char *string_addr) { struct sockaddr_storage sa; - size_t salen = sizeof(sa); + socklen_t salen = sizeof sa; assert(fd >= 0); assert(ipaddr != NULL); @@ -247,7 +247,7 @@ getpeer_information(int fd, char *ipaddr, char *string_addr) strlcpy(string_addr, "[unknown]", HOSTNAME_LENGTH); /* Look up the IP address */ - if (getpeername(fd, (struct sockaddr *)&sa, &salen) != 0) + if (getpeername(fd, (struct sockaddr *) &sa, &salen) != 0) return -1; if (get_ip_string((struct sockaddr *)&sa, ipaddr, IP_LENGTH) == NULL) |