daemon: remove write-only variable maxfd
authorRené Scharfe <l.s.r@web.de>
Wed, 1 Oct 2014 10:21:57 +0000 (12:21 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 Oct 2014 20:34:56 +0000 (13:34 -0700)
It became unused when 6573faff (NO_IPV6 support for git daemon) replaced
select() with poll().

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
daemon.c
index 3be38f4dbcb0e9f79a68ceccb33f29607536df41..57b1a5783f0666fb82d7c4be3d7d2c81590e6139 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -841,7 +841,6 @@ static const char *ip2str(int family, struct sockaddr *sin, socklen_t len)
 static int setup_named_sock(char *listen_addr, int listen_port, struct socketlist *socklist)
 {
        int socknum = 0;
 static int setup_named_sock(char *listen_addr, int listen_port, struct socketlist *socklist)
 {
        int socknum = 0;
-       int maxfd = -1;
        char pbuf[NI_MAXSERV];
        struct addrinfo hints, *ai0, *ai;
        int gai;
        char pbuf[NI_MAXSERV];
        struct addrinfo hints, *ai0, *ai;
        int gai;
@@ -909,9 +908,6 @@ static int setup_named_sock(char *listen_addr, int listen_port, struct socketlis
                ALLOC_GROW(socklist->list, socklist->nr + 1, socklist->alloc);
                socklist->list[socklist->nr++] = sockfd;
                socknum++;
                ALLOC_GROW(socklist->list, socklist->nr + 1, socklist->alloc);
                socklist->list[socklist->nr++] = sockfd;
                socknum++;
-
-               if (maxfd < sockfd)
-                       maxfd = sockfd;
        }
 
        freeaddrinfo(ai0);
        }
 
        freeaddrinfo(ai0);