Merge branch 'rs/xcalloc-takes-nelem-first'

Code cleanup.

* rs/xcalloc-takes-nelem-first:
  fix xcalloc() argument order
This commit is contained in:
Junio C Hamano
2021-03-19 15:25:39 -07:00
4 changed files with 17 additions and 6 deletions

View File

@ -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;