From: Elia Pinto Date: Wed, 29 Jan 2014 13:36:15 +0000 (-0800) Subject: builtin/clean.c: reduce scope of variable X-Git-Tag: v2.0.0-rc0~158^2~3 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/e666b89d76c9a25ce4cb3b73932a78524475fc27 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 615cd57caf..22ad058c79 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); }