--- merge-recursive.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/merge-recursive.c b/merge-recursive.c index 5f42c677d5..9b9a4b8213 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -1851,7 +1851,7 @@ static struct hashmap *get_directory_renames(struct diff_queue_struct *pairs, * renames, finding out how often each directory rename pair * possibility occurs. */ - dir_renames = xmalloc(sizeof(struct hashmap)); + dir_renames = xmalloc(sizeof(*dir_renames)); dir_rename_init(dir_renames); for (i = 0; i < pairs->nr; ++i) { struct string_list_item *item; @@ -1871,7 +1871,7 @@ static struct hashmap *get_directory_renames(struct diff_queue_struct *pairs, entry = dir_rename_find_entry(dir_renames, old_dir); if (!entry) { - entry = xmalloc(sizeof(struct dir_rename_entry)); + entry = xmalloc(sizeof(*entry)); dir_rename_entry_init(entry, old_dir); hashmap_put(dir_renames, entry); } else { -- 2.16.0.32.gc5b761fb27.dirty