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

[PATCH 7/7] cleanups: remove unused variable from exec_cmd.c

From
SHSerge E. Hallyn <serue@us.ibm.com>
Date
Apr 17, 2006, 15:14 UTC
Message-ID
<20060417151448.3130F19B914@sergelap.hallyn.com>
In-Reply-To
<20060417145148.2F3CB19C90D@sergelap.hallyn.com>

Not sure whether it should be removed, or whether execv_git_cmd() should return it rather than -1 at bottom.

Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
---
 exec_cmd.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
3229a225008ab56b33b1ae7511d91f6b698cd19a
diff --git a/exec_cmd.c b/exec_cmd.c
index 590e738..44bb2f2 100644
--- a/exec_cmd.c
+++ b/exec_cmd.c
@@ -32,7 +32,7 @@ const char *git_exec_path(void)
 int execv_git_cmd(const char **argv)
 {
 	char git_command[PATH_MAX + 1];
-	int len, err, i;
+	int len,  i;
 	const char *paths[] = { current_exec_path,
 				getenv("GIT_EXEC_PATH"),
 				builtin_exec_path };
@@ -85,8 +85,6 @@ int execv_git_cmd(const char **argv)
 		/* execve() can only ever return if it fails */
 		execve(git_command, (char **)argv, environ);
 
-		err = errno;
-
 		argv[0] = tmp;
 	}
 	return -1;
-- 
1.2.5
Previous: Serge E. HallynNext: Junio C Hamano
Message 12 of 13 in “cleanups: intro”
  1. 0/7 cleanups: introSerge E. Hallyn, Apr 17, 2006
  2. 1/7 cleanups: Fix resource leak and buffer overrun in daemon.cSerge E. Hallyn, Apr 17, 2006
  3. Junio C HamanoApr 17, 2006
  4. Serge E. HallynApr 18, 2006
  5. Junio C HamanoApr 18, 2006
  6. 2/7 cleanups: Fix potential bugs in connect.cSerge E. Hallyn, Apr 17, 2006
  7. 3/7 cleanups: Remove unused vars from combine-diff.cSerge E. Hallyn, Apr 17, 2006
  8. 5/7 cleanups: Remove unused variable from sha1_file.cSerge E. Hallyn, Apr 17, 2006
  9. Junio C HamanoApr 17, 2006
  10. 6/7 cleanups: prevent leak of two strduped strings in config.cSerge E. Hallyn, Apr 17, 2006
  11. 4/7 cleanups: Remove impossible case in quote.cSerge E. Hallyn, Apr 17, 2006
  12. 7/7 cleanups: remove unused variable from exec_cmd.cSerge E. Hallyn, Apr 17, 2006
  13. Junio C HamanoApr 17, 2006

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.