summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-10-30 12:11:03 -0700
committerJunio C Hamano <gitster@pobox.com>2013-10-30 12:11:04 -0700
commit149a8134a77fa6c0a692e97aade8aeae71668be8 (patch)
treefa13776a7eb2c3f2b48f9e0b611a8b7dba8f0411 /refs.c
parent7522c589c94f00c0175a0e705b48a7218998fe89 (diff)
parenta4165851e769ebc32da48904d58f144f2d93e69a (diff)
downloadgit-149a8134a77fa6c0a692e97aade8aeae71668be8.tar.gz
Merge branch 'jk/refs-c-squelch-gcc'
* jk/refs-c-squelch-gcc: silence gcc array-bounds warning
Diffstat (limited to 'refs.c')
-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]);