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

[PATCH] config: remove useless assignment

From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
Date
Mar 28, 2012, 20:18 UTC
Message-ID
<4F73721D.4010808@lsrfire.ath.cx>

v1.7.9-8-g270a344 (config: stop using config_exclusive_filename) replaced config_exclusive_filename with given_config_file. In one case this resulted in a self-assignment, which is reported by clang as a warning. Remove the useless code.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
---
 builtin/config.c |    2 --
 1 file changed, 2 deletions(-)
diff --git a/builtin/config.c b/builtin/config.c
index d41a9bf..33c8820 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -397,8 +397,6 @@ int cmd_config(int argc, const char **argv, const char *prefix)
 				xstrdup(prefix_filename(prefix,
 							strlen(prefix),
 							given_config_file));
-		else
-			given_config_file = given_config_file;
 	}
 
 	if (respect_includes == -1)
-- 
1.7.9.2
Next: Jeff King
Message 1 of 2 in “config: remove useless assignment”
  1. config: remove useless assignmentRené Scharfe, Mar 28, 2012
  2. Jeff KingMar 28, 2012

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.