Skip to content

Commit

Permalink
Merge branch 'jk/refs-c-squelch-gcc'
Browse files Browse the repository at this point in the history
* jk/refs-c-squelch-gcc:
  silence gcc array-bounds warning
  • Loading branch information
Junio C Hamano committed Oct 30, 2013
2 parents 7522c58 + a416585 commit 149a813
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion refs.c
Original file line number Diff line number Diff line change
Expand Up @@ -3376,7 +3376,7 @@ char *shorten_unambiguous_ref(const char *refname, int strict)
size_t total_len = 0;

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

Expand Down

0 comments on commit 149a813

Please sign in to comment.