summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-10-30 12:11:03 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-10-30 12:11:04 -0700
commit149a8134a77fa6c0a692e97aade8aeae71668be8 (patch)
treefa13776a7eb2c3f2b48f9e0b611a8b7dba8f0411
parentMerge branch 'jk/date-c-double-semicolon' (diff)
parentsilence gcc array-bounds warning (diff)
downloadtgif-149a8134a77fa6c0a692e97aade8aeae71668be8.tar.xz
Merge branch 'jk/refs-c-squelch-gcc'
* jk/refs-c-squelch-gcc: silence gcc array-bounds warning
-rw-r--r--refs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/refs.c b/refs.c
index 3710748ab8..0c0e963532 100644
--- a/refs.c
+++ b/refs.c
@@ -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]);