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

[PATCH] Remove useless memset of static command name lists in builtin-merge.c

From
Alex Riesen <raa.lkml@gmail.com>
Date
Aug 28, 2008, 17:17 UTC
Message-ID
<20080828171713.GB6024@blimp.local>
The statics are always initialized with 0
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
...and we already depend on it.
 builtin-merge.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/builtin-merge.c b/builtin-merge.c
index dcd08f7..9ad9791 100644
--- a/builtin-merge.c
+++ b/builtin-merge.c
@@ -93,8 +93,6 @@ static struct strategy *get_strategy(const char *name)
 		struct cmdnames not_strategies;
 		loaded = 1;
 
-		memset(&main_cmds, 0, sizeof(struct cmdnames));
-		memset(&other_cmds, 0, sizeof(struct cmdnames));
 		memset(&not_strategies, 0, sizeof(struct cmdnames));
 		load_command_list("git-merge-", &main_cmds, &other_cmds);
 		for (i = 0; i < main_cmds.cnt; i++) {
-- 
1.6.0.1.150.g5966
Message 1 of 1 in “Remove useless memset of static command name lists in builtin-merge.c”
  1. Remove useless memset of static command name lists in builtin-merge.cAlex Riesen, Aug 28, 2008

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.