Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArjun Sreedharan <arjun024@gmail.com>2014-08-30 10:54:23 +0400
committerJunio C Hamano <gitster@pobox.com>2014-09-04 01:35:37 +0400
commit693eb02a5e152668dacc7c6ff0f1c63d70c0a82a (patch)
tree8952b72fa82f945bf7335e140509eea935ce25eb /builtin/for-each-ref.c
parent96db324a73fdada6fbe7b63221986f8f18cc63b0 (diff)
calloc() and xcalloc() takes nmemb and then size
There are a handful more instances of this in compat/regex/ but they are borrowed code taht we do not want to touch with a change that really affects correctness, which this change is not. Signed-off-by: Arjun Sreedharan <arjun024@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/for-each-ref.c')
-rw-r--r--builtin/for-each-ref.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c
index 47bd624696d..69bba067189 100644
--- a/builtin/for-each-ref.c
+++ b/builtin/for-each-ref.c
@@ -633,7 +633,7 @@ static void populate_value(struct refinfo *ref)
unsigned long size;
const unsigned char *tagged;
- ref->value = xcalloc(sizeof(struct atom_value), used_atom_cnt);
+ ref->value = xcalloc(used_atom_cnt, sizeof(struct atom_value));
if (need_symref && (ref->flag & REF_ISSYMREF) && !ref->symref) {
unsigned char unused1[20];