From bf7e645c90e08f0d3391502c888453033e446372 Mon Sep 17 00:00:00 2001 From: Elia Pinto Date: Wed, 29 Jan 2014 08:54:16 -0800 Subject: [PATCH] builtin/fetch.c: reduce scope of variable Signed-off-by: Elia Pinto Signed-off-by: Junio C Hamano --- builtin/fetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/fetch.c b/builtin/fetch.c index bd7a10164f..256c9eb020 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -987,7 +987,6 @@ static int fetch_multiple(struct string_list *list) static int fetch_one(struct remote *remote, int argc, const char **argv) { - int i; static const char **refs = NULL; struct refspec *refspec; int ref_nr = 0; @@ -1011,6 +1010,7 @@ static int fetch_one(struct remote *remote, int argc, const char **argv) if (argc > 0) { int j = 0; + int i; refs = xcalloc(argc + 1, sizeof(const char *)); for (i = 0; i < argc; i++) { if (!strcmp(argv[i], "tag")) { -- 2.11.4.GIT