From e666b89d76c9a25ce4cb3b73932a78524475fc27 Mon Sep 17 00:00:00 2001 From: Elia Pinto Date: Wed, 29 Jan 2014 05:36:15 -0800 Subject: builtin/clean.c: reduce scope of variable Signed-off-by: Elia Pinto Signed-off-by: Junio C Hamano diff --git a/builtin/clean.c b/builtin/clean.c index 615cd57..22ad058 100644 --- a/builtin/clean.c +++ b/builtin/clean.c @@ -154,7 +154,7 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag, DIR *dir; struct strbuf quoted = STRBUF_INIT; struct dirent *e; - int res = 0, ret = 0, gone = 1, original_len = path->len, len, i; + int res = 0, ret = 0, gone = 1, original_len = path->len, len; unsigned char submodule_head[20]; struct string_list dels = STRING_LIST_INIT_DUP; @@ -242,6 +242,7 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag, } if (!*dir_gone && !quiet) { + int i; for (i = 0; i < dels.nr; i++) printf(dry_run ? _(msg_would_remove) : _(msg_remove), dels.items[i].string); } -- cgit v0.10.2-6-g49f6