Commit dad3c319d76f58bc600b53650723d0d3cc9e6feb

Edward Thomson 2017-01-27T17:56:52

Merge pull request #4095 from mplough/master Fix uninitialized variable warning

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/submodule.c b/src/submodule.c
index fc3dcb4..1c17075 100644
--- a/src/submodule.c
+++ b/src/submodule.c
@@ -401,7 +401,7 @@ done:
 static int submodules_from_head(git_strmap *map, git_tree *head, git_config *cfg)
 {
 	int error;
-	git_iterator *i;
+	git_iterator *i = NULL;
 	const git_index_entry *entry;
 	git_strmap *names = 0;
 	git_strmap_alloc(&names);