diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-10-30 12:11:03 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-10-30 12:11:04 -0700 |
commit | 149a8134a77fa6c0a692e97aade8aeae71668be8 (patch) | |
tree | fa13776a7eb2c3f2b48f9e0b611a8b7dba8f0411 /refs.c | |
parent | 7522c589c94f00c0175a0e705b48a7218998fe89 (diff) | |
parent | a4165851e769ebc32da48904d58f144f2d93e69a (diff) | |
download | git-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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]); |