diff options
-rw-r--r-- | builtin/blame.c | 2 | ||||
-rw-r--r-- | merge-recursive.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/builtin/blame.c b/builtin/blame.c index 88cb799727..6e22bdfbfa 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -2019,7 +2019,7 @@ static struct commit *fake_working_tree_commit(struct diff_options *opt, struct strbuf msg = STRBUF_INIT; time(&now); - commit = xcalloc(1, sizeof(*commit)); + commit = alloc_commit_node(); commit->object.parsed = 1; commit->date = now; commit->object.type = OBJ_COMMIT; diff --git a/merge-recursive.c b/merge-recursive.c index 4177092942..fc2a68a0d1 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -40,7 +40,7 @@ static struct tree *shift_tree_object(struct tree *one, struct tree *two, static struct commit *make_virtual_commit(struct tree *tree, const char *comment) { - struct commit *commit = xcalloc(1, sizeof(struct commit)); + struct commit *commit = alloc_commit_node(); struct merge_remote_desc *desc = xmalloc(sizeof(*desc)); desc->name = comment; |