summaryrefslogtreecommitdiff
path: root/builtin-mv.c
diff options
context:
space:
mode:
authorPierre Habouzit <madcoder@debian.org>2006-08-23 10:39:13 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-08-24 01:47:39 (GMT)
commitd828f6ddf8bc33f848688655b94c82791edfe0d7 (patch)
tree83f546e7c6d66e735d4ca07272efc0759aae6243 /builtin-mv.c
parentb5bf7cd6b7dbcbef9181e21bfae21612c75738c4 (diff)
downloadgit-d828f6ddf8bc33f848688655b94c82791edfe0d7.zip
git-d828f6ddf8bc33f848688655b94c82791edfe0d7.tar.gz
git-d828f6ddf8bc33f848688655b94c82791edfe0d7.tar.bz2
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>
Diffstat (limited to 'builtin-mv.c')
-rw-r--r--builtin-mv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin-mv.c b/builtin-mv.c
index ff882be..fd1e520 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);
}