builtin/clean.c: reduce scope of variable
Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elia Pinto committed
Jan 29, 2014 at 05:36 UTC
e666b89d76c9a25ce4cb3b73932a78524475fc27
1 file changed
+2
-1
builtin/clean.c
+2
-1
@@ -154,7 +154,7 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,
154
DIR *dir;
155
struct strbuf quoted = STRBUF_INIT;
156
struct dirent *e;
157
- int res = 0, ret = 0, gone = 1, original_len = path->len, len, i;
157
+ int res = 0, ret = 0, gone = 1, original_len = path->len, len;
158
unsigned char submodule_head[20];
159
struct string_list dels = STRING_LIST_INIT_DUP;
160
@@ -242,6 +242,7 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,
242
}
243
244
if (!*dir_gone && !quiet) {
245
+ int i;
246
for (i = 0; i < dels.nr; i++)
247
printf(dry_run ? _(msg_would_remove) : _(msg_remove), dels.items[i].string);
248
}