From d828f6ddf8bc33f848688655b94c82791edfe0d7 Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Wed, 23 Aug 2006 12:39:13 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- builtin-mv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'builtin-mv.c') diff --git a/builtin-mv.c b/builtin-mv.c index ff882bec47..fd1e520981 100644 --- a/builtin-mv.c +++ b/builtin-mv.c @@ -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); } -- cgit v1.2.1