summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Habouzit <madcoder@debian.org>2006-08-23 10:39:16 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-08-24 01:47:39 (GMT)
commit5df7dbbae4a51e20afc00acc5c87ea4536d1302c (patch)
treec4bfe3a53d8516b1bc73d9b796a553938efc2fe4
parentdd305c846231e2fddf61c1e1314029b53af88a77 (diff)
downloadgit-5df7dbbae4a51e20afc00acc5c87ea4536d1302c.zip
git-5df7dbbae4a51e20afc00acc5c87ea4536d1302c.tar.gz
git-5df7dbbae4a51e20afc00acc5c87ea4536d1302c.tar.bz2
n is in fact unused, and is later shadowed.
date.c::approxidate_alpha() counts the number of alphabets while moving the pointer but does not use the count. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--date.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/date.c b/date.c
index 66be23a..d780846 100644
--- a/date.c
+++ b/date.c
@@ -584,10 +584,10 @@ static const char *approxidate_alpha(const char *date, struct tm *tm, int *num)
const struct typelen *tl;
const struct special *s;
const char *end = date;
- int n = 1, i;
+ int i;
- while (isalpha(*++end))
- n++;
+ while (isalpha(*++end));
+ ;
for (i = 0; i < 12; i++) {
int match = match_string(date, month_names[i]);