Skip to content

Commit

Permalink
builtin/clean.c: reduce scope of variable
Browse files Browse the repository at this point in the history
Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Elia Pinto authored and Junio C Hamano committed Jan 31, 2014
1 parent ac39b27 commit e666b89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion builtin/clean.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit e666b89

Please sign in to comment.