summaryrefslogtreecommitdiff
path: root/hittpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'hittpd.c')
-rw-r--r--hittpd.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/hittpd.c b/hittpd.c
index 16d8e0e..a9ead14 100644
--- a/hittpd.c
+++ b/hittpd.c
@@ -227,9 +227,9 @@ peername(int fd)
socklen_t slen = sizeof ss;
static char addrbuf[NI_MAXHOST];
- if (getpeername(fd, (struct sockaddr *)(void *)&ss, &slen) < 0)
+ if (getpeername(fd, (struct sockaddr *)&ss, &slen) < 0)
return "0.0.0.0";
- if (getnameinfo((struct sockaddr *)(void *)&ss, slen,
+ if (getnameinfo((struct sockaddr *)&ss, slen,
addrbuf, sizeof addrbuf, 0, 0, NI_NUMERICHOST) < 0)
return "0.0.0.0";
@@ -1006,9 +1006,8 @@ main(int argc, char *argv[])
char portbuf[PATH_MAX] = "(unknown)";
struct sockaddr_storage ss;
socklen_t slen = sizeof ss;
- if (getsockname(listenfd,
- (struct sockaddr *)(void *)&ss, &slen) == 0 &&
- getnameinfo((struct sockaddr *)(void *)&ss, slen,
+ if (getsockname(listenfd, (struct sockaddr *)&ss, &slen) == 0 &&
+ getnameinfo((struct sockaddr *)&ss, slen,
addrbuf, sizeof addrbuf, portbuf, sizeof portbuf,
NI_NUMERICHOST | NI_NUMERICSERV) == 0)
addr = addrbuf;