Skip to content

Commit 149a813

Browse files
committed
Merge branch 'jk/refs-c-squelch-gcc'
* jk/refs-c-squelch-gcc: silence gcc array-bounds warning
2 parents 7522c58 + a416585 commit 149a813

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

refs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3376,7 +3376,7 @@ char *shorten_unambiguous_ref(const char *refname, int strict)
33763376
size_t total_len = 0;
33773377

33783378
/* the rule list is NULL terminated, count them first */
3379-
for (; ref_rev_parse_rules[nr_rules]; nr_rules++)
3379+
for (nr_rules = 0; ref_rev_parse_rules[nr_rules]; nr_rules++)
33803380
/* no +1 because strlen("%s") < strlen("%.*s") */
33813381
total_len += strlen(ref_rev_parse_rules[nr_rules]);
33823382

0 commit comments

Comments
 (0)