git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
René Scharfe <l.s.r@web.de>
Date
Oct 1, 2014, 10:21 UTC
Message-ID
<542BD5C5.7050604@web.de>
In-Reply-To
<542BD4E7.7030401@web.de>

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>
---
 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
Previous: René ScharfeNext: Junio C Hamano
Message 3 of 4 in “daemon: handle gethostbyname() error”
  1. 1/3 daemon: handle gethostbyname() errorRené Scharfe, Oct 1, 2014
  2. 2/3 daemon: fix error message after bind()René Scharfe, Oct 1, 2014
  3. 3/3 daemon: remove write-only variable maxfdRené Scharfe, Oct 1, 2014
  4. Junio C HamanoOct 1, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.