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

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin-merge.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-merge.c b/builtin-merge.c
index dcaf3681dc..d0bf1fc1ed 100644
--- a/builtin-merge.c
+++ b/builtin-merge.c
@@ -651,12 +651,12 @@ static void add_strategies(const char *string, unsigned attr)
static int merge_trivial(void)
{
unsigned char result_tree[20], result_commit[20];
- struct commit_list *parent = xmalloc(sizeof(struct commit_list *));
+ struct commit_list *parent = xmalloc(sizeof(*parent));
write_tree_trivial(result_tree);
printf("Wonderful.\n");
parent->item = lookup_commit(head);
- parent->next = xmalloc(sizeof(struct commit_list *));
+ parent->next = xmalloc(sizeof(*parent->next));
parent->next->item = remoteheads->item;
parent->next->next = NULL;
commit_tree(merge_msg.buf, result_tree, parent, result_commit);