summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2014-09-19 11:38:37 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-09-19 11:38:37 -0700
commit14e2ae6126509feeb379f490d925cccd3dd9f7c0 (patch)
tree14b36b1e0239ef1e915802cd0287a6bbda226aa5 /builtin
parentMerge branch 'tb/crlf-tests' (diff)
parentcalloc() and xcalloc() takes nmemb and then size (diff)
downloadtgif-14e2ae6126509feeb379f490d925cccd3dd9f7c0.tar.xz
Merge branch 'as/calloc-takes-nmemb-then-size'
Code clean-up. * as/calloc-takes-nmemb-then-size: calloc() and xcalloc() takes nmemb and then size
Diffstat (limited to 'builtin')
-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 47bd624696..69bba06718 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];