Skip to content

Commit 5df7dbb

Browse files
MadCoderJunio C Hamano
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent dd305c8 commit 5df7dbb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

date.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -584,10 +584,10 @@ static const char *approxidate_alpha(const char *date, struct tm *tm, int *num)
584584
const struct typelen *tl;
585585
const struct special *s;
586586
const char *end = date;
587-
int n = 1, i;
587+
int i;
588588

589-
while (isalpha(*++end))
590-
n++;
589+
while (isalpha(*++end));
590+
;
591591

592592
for (i = 0; i < 12; i++) {
593593
int match = match_string(date, month_names[i]);

0 commit comments

Comments
 (0)