fetch: declare variables at the top of the block
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;