Commit 2ce37794d0d8cdb991c120ee5c6006b20328f8da

Edward Thomson 2015-01-06T18:34:55

Merge pull request #2805 from ethomson/msvc submodule: declare vars at top of func block

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/src/submodule.c b/src/submodule.c
index d89dd04..a7bdebe 100644
--- a/src/submodule.c
+++ b/src/submodule.c
@@ -889,8 +889,11 @@ static int git_submodule_update_repo_init_cb(
 	int bare,
 	void *payload)
 {
+	git_submodule *sm;
+
 	GIT_UNUSED(bare);
-	git_submodule *sm = payload;
+
+	sm = payload;
 
 	return submodule_repo_create(out, sm->repo, path);
 }