summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b5bf7cd)
raw | patch | inline | side by side (parent: b5bf7cd)
author | Pierre Habouzit <madcoder@debian.org> | |
Wed, 23 Aug 2006 10:39:13 +0000 (12:39 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 24 Aug 2006 01:47:39 +0000 (18:47 -0700) |
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>
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>
builtin-mv.c | patch | blob | history | |
git.c | patch | blob | history |
diff --git a/builtin-mv.c b/builtin-mv.c
index ff882bec474c59c9cb4bb49d723cf81febb204ad..fd1e52098174be212c51b957280f38dc6e9c0e48 100644 (file)
--- a/builtin-mv.c
+++ b/builtin-mv.c
} 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);
}
index 930998bbe542cbaa92b3f16a6b0dc0d6ad43b874..a01d195c2319fd21fb361e535c5d6333550e3dbd 100644 (file)
--- a/git.c
+++ b/git.c
if (p->option & USE_PAGER)
setup_pager();
if (getenv("GIT_TRACE")) {
- int i;
+ int j;
fprintf(stderr, "trace: built-in: git");
- for (i = 0; i < argc; ++i) {
+ for (j = 0; j < argc; ++j) {
fputc(' ', stderr);
- sq_quote_print(stderr, argv[i]);
+ sq_quote_print(stderr, argv[j]);
}
putc('\n', stderr);
fflush(stderr);