# [PATCH] worktree: fix an 'using plain integer as NULL pointer' warning

1 messages from 2017-01-12 to 2017-01-12. Participants: Ramsay Jones.
Thread: https://gitlist.dev/t/44867

## Ramsay Jones, 2017-01-12 23:18

Subject: [PATCH] worktree: fix an 'using plain integer as NULL pointer' warning
Message-ID: <7b28631d-77c1-b8a0-c671-307b9bef33ad@ramsayjones.plus.com>
URL: https://gitlist.dev/e/7b28631d-77c1-b8a0-c671-307b9bef33ad%40ramsayjones.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 62985f75c1
"worktree move: refuse to move worktrees with submodules", 08-01-2017).

[BTW, this is a sparse warning, just in case you were wondering!]

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 339c622e2..a1c91f154 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -528,7 +528,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.11.0

```
