From b34aab38b6795b6a82aef0019c3d1cc733840e3e Mon Sep 17 00:00:00 2001 From: "git@daemon.de" Date: Sun, 26 Apr 2015 20:27:56 +0200 Subject: [PATCH] removed unused/redundant code --- net.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/net.c b/net.c index d53dc43..62d425e 100644 --- a/net.c +++ b/net.c @@ -26,13 +26,6 @@ -char *ntoa(struct sockaddr_in *src) { - char *ip = malloc(32); - inet_ntop(AF_INET, (struct in_addr *)&src->sin_addr, ip, 32); - return ip; -} - - /* called each time when the loop restarts to feed select() correctly */ int fill_set(fd_set *fds) { int max = 0; @@ -326,10 +319,6 @@ int main_loop(int listensocket, host_t *listen_h, host_t *bind_h, host_t *dst_h) /* we came here via signal handler, clean up */ - client_t *current = NULL; - client_iter(clients, current) { - close(current->socket); - } close(listensocket); client_clean(1);