summary refs log tree commit diff
path: root/ref-filter.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-03-19 15:25:39 -0700
committerJunio C Hamano <gitster@pobox.com>2021-03-19 15:25:39 -0700
commitbfcc6e2a68b95ee71fc606a2e3917af78f1130f9 (patch)
tree30a225e537754d8b2579304d9872b0374be18c73 /ref-filter.c
parentaf107029b1b10f56b7e8b35ea605eab54f4efbe2 (diff)
parent241b5d3ebeea21b70a74fdc8c74e73f7ed829cb1 (diff)
Merge branch 'rs/xcalloc-takes-nelem-first'
Code cleanup.

* rs/xcalloc-takes-nelem-first:
  fix xcalloc() argument order
Diffstat (limited to 'ref-filter.c')
-rw-r--r--ref-filter.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ref-filter.c b/ref-filter.c
index 643e69bda6..f0bd32f714 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -772,7 +772,8 @@ static int if_atom_handler(struct atom_value *atomv, struct ref_formatting_state
 			   struct strbuf *unused_err)
 {
 	struct ref_formatting_stack *new_stack;
-	struct if_then_else *if_then_else = xcalloc(sizeof(struct if_then_else), 1);
+	struct if_then_else *if_then_else = xcalloc(1,
+						    sizeof(struct if_then_else));
 
 	if_then_else->str = atomv->atom->u.if_then_else.str;
 	if_then_else->cmp_status = atomv->atom->u.if_then_else.cmp_status;