remove ugly shadowing of loop indexes in subloops.
builtin-mv.c and git.c has a nested loop that is governed by a variable 'i', but they shadow it with another instance of 'i'. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:

committed by
Junio C Hamano

parent
b5bf7cd6b7
commit
d828f6ddf8
@ -262,10 +262,10 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
|
||||
} else {
|
||||
for (i = 0; i < changed.nr; i++) {
|
||||
const char *path = changed.items[i].path;
|
||||
int i = cache_name_pos(path, strlen(path));
|
||||
struct cache_entry *ce = active_cache[i];
|
||||
int j = cache_name_pos(path, strlen(path));
|
||||
struct cache_entry *ce = active_cache[j];
|
||||
|
||||
if (i < 0)
|
||||
if (j < 0)
|
||||
die ("Huh? Cache entry for %s unknown?", path);
|
||||
refresh_cache_entry(ce, 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user