threads / patch / 35757

patch, 6 partsbuiltin/fetch.c: reduce scope of variable

Subject: [PATCH 6/6] builtin/fetch.c: reduce scope of variable

## tl;dr

One message between Jan 29, 2014 and Jan 29, 2014. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Elia Pinto· Jan 29, 2014, 16:54 UTC · lore
Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 builtin/fetch.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to builtin/fetch.c +1 −1
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 025bc3e..55f457c 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -1026,7 +1026,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;
@@ -1050,6 +1049,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")) {
-- 
1.7.10.4

← back to recent threads