Thread (3 messages) 3 messages, 1 author, 2016-06-15

[PATCH 3/3] daemon: remove write-only variable maxfd

flat view
DORMANTno replies

From: René Scharfe <hidden>
Date: 2016-06-15 23:02:37
Subsystem: the rest · Maintainer: Linus Torvalds

It became unused when 6573faff (NO_IPV6 support for git daemon) replaced
select() with poll().

Signed-off-by: Rene Scharfe <redacted>
---
 daemon.c | 4 ----
 1 file changed, 4 deletions(-)
diff --git a/daemon.c b/daemon.c
index 090f6a4..54a03bd 100644
--- a/daemon.c
+++ b/daemon.c
@@ -815,7 +815,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;
-	int maxfd = -1;
 	char pbuf[NI_MAXSERV];
 	struct addrinfo hints, *ai0, *ai;
 	int gai;
@@ -883,9 +882,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++;
-
-		if (maxfd < sockfd)
-			maxfd = sockfd;
 	}
 
 	freeaddrinfo(ai0);
-- 
2.1.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help