From b2b571ce0c2969bdc00bfa400d20da5cdece1dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Thu, 18 Oct 2012 19:05:24 +0200 Subject: [PATCH] fetch: declare variables at the top of the block --- src/fetch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fetch.c b/src/fetch.c index 4f3d73d0e..dc01f6791 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;