Skip to content

Commit e666b89

Browse files
devzero2000gitster
authored andcommitted
builtin/clean.c: reduce scope of variable
Signed-off-by: Elia Pinto <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ac39b27 commit e666b89

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

builtin/clean.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,
154154
DIR *dir;
155155
struct strbuf quoted = STRBUF_INIT;
156156
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;
158158
unsigned char submodule_head[20];
159159
struct string_list dels = STRING_LIST_INIT_DUP;
160160

@@ -242,6 +242,7 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,
242242
}
243243

244244
if (!*dir_gone && !quiet) {
245+
int i;
245246
for (i = 0; i < dels.nr; i++)
246247
printf(dry_run ? _(msg_would_remove) : _(msg_remove), dels.items[i].string);
247248
}

0 commit comments

Comments
 (0)