worktree: initialize return value for submodule_uses_worktrees

When the worktrees directory is empty, the `ret` will be returned uninitialized. Fix it by initializing the value. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Stefan Beller committed Dec 27, 2016 at 09:50 UTC 7c4be458b1c7ba81b0cc63d76a144261eb2395be
1 file changed +1 -1
worktree.c
+1 -1
@@ -387,7 +387,7 @@ int submodule_uses_worktrees(const char *path)
387 struct strbuf sb = STRBUF_INIT;
388 DIR *dir;
389 struct dirent *d;
390 - int ret;
390 + int ret = 0;
391 struct repository_format format;
392
393 submodule_gitdir = git_pathdup_submodule(path, "%s", "");