Commit b2b571ce0c2969bdc00bfa400d20da5cdece1dcd

Carlos Martín Nieto 2012-10-18T19:05:24

fetch: declare variables at the top of the block

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/src/fetch.c b/src/fetch.c
index 4f3d73d..dc01f67 100644
--- a/src/fetch.c
+++ b/src/fetch.c
@@ -379,13 +379,14 @@ int git_fetch__download_pack(
 	}
 
 	do {
+		git_pkt *pkt;
+
 		if (t->cancel.val) {
 			giterr_set(GITERR_NET, "The fetch was cancelled by the user");
 			error = GIT_EUSER;
 			goto on_error;
 		}
 
-		git_pkt *pkt;
 		if (recv_pkt(&pkt, buf) < 0)
 			goto on_error;