From: Pierre Habouzit <madcoder@debian.org>
To: git@vger.kernel.org
Cc: Pierre Habouzit <madcoder@debian.org>
Subject: [PATCH 4/7] remove ugly shadowing of loop indexes in subloops.
Date: Wed, 23 Aug 2006 12:39:13 +0200 [thread overview]
Message-ID: <11563295573215-git-send-email-madcoder@debian.org> (raw)
In-Reply-To: <1156329556788-git-send-email-madcoder@debian.org>
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
---
builtin-mv.c | 6 +++---
git.c | 6 +++---
2 files changed, 6 insertions(+), 6 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,
} 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);
}
diff --git a/git.c b/git.c
index 930998b..a01d195 100644
--- a/git.c
+++ b/git.c
@@ -292,11 +292,11 @@ static void handle_internal_command(int
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);
--
1.4.1.1
next prev parent reply other threads:[~2006-08-23 10:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-23 10:39 [PATCH 1/7] avoid to use error that shadows the function name, use err instead Pierre Habouzit
2006-08-23 10:39 ` [PATCH 2/7] git_dir holds pointers to local strings, hence MUST be const Pierre Habouzit
2006-08-23 10:39 ` [PATCH 3/7] missing 'static' keywords Pierre Habouzit
2006-08-23 10:39 ` Pierre Habouzit [this message]
2006-08-23 10:39 ` [PATCH 5/7] missing #define DEBUG 0 that made the preprocessor whine Pierre Habouzit
2006-08-23 10:39 ` [PATCH 6/7] use name[len] in switch directly, instead of creating a shadowed variable Pierre Habouzit
2006-08-23 10:39 ` [PATCH 7/7] n is in fact unused, and is later shadowed Pierre Habouzit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11563295573215-git-send-email-madcoder@debian.org \
--to=madcoder@debian.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).