threads / patch / 45772

patchworktree: fix an 'Using integer as a NULL pointer' warning

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

## tl;dr

One message between Apr 22, 2017 and Apr 22, 2017. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Ramsay Jones· Apr 22, 2017, 00:55 UTC · lore
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(-)
Show changes to builtin/worktree.c +1 −1
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

← back to recent threads