Commit 5018e2c639aa956dd61a390699a579f8de6a4841

Edward Thomson 2015-01-06T17:08:38

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);
 }