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

[PATCH] worktree: fix an 'Using integer as a NULL pointer' warning

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Apr 22, 2017, 00:55 UTC
Message-ID
<d0e81b1e-5869-299e-f462-4d43dc997bd1@ramsayjones.plus.com>
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
Hi Duy,

If you need to re-roll your 'nd/worktree-move' branch could you please squash this into the relevant patch (commit 8a1dc92e91 ("worktree move: refuse to move worktrees with submodules", 20-04-2017)).

Thanks!

ATB, Ramsay Jones

 builtin/worktree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/worktree.c b/builtin/worktree.c
index ff9ccb57f..c54abd5b8 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -534,7 +534,7 @@ static int unlock_worktree(int ac, const char **av, const char *prefix)
 
 static void validate_no_submodules(const struct worktree *wt)
 {
-	struct index_state istate = {0};
+	struct index_state istate = { NULL };
 	int i, found_submodules = 0;
 
 	if (read_index_from(&istate, worktree_git_path(wt, "index")) > 0) {
-- 
2.12.0
Message 1 of 1 in “worktree: fix an 'Using integer as a NULL pointer' warning”
  1. worktree: fix an 'Using integer as a NULL pointer' warningRamsay Jones, Apr 22, 2017

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.