From 26b455f21ed7e0c7b0e4e4e69b5ae48545597020 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 6 Oct 2019 23:30:32 +0000 Subject: hashmap_put takes "struct hashmap_entry *" This is less error-prone than "void *" as the compiler now detects invalid types being passed. Signed-off-by: Eric Wong Reviewed-by: Derrick Stolee Signed-off-by: Junio C Hamano --- merge-recursive.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'merge-recursive.c') diff --git a/merge-recursive.c b/merge-recursive.c index f60451d396..a685b4fb69 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -2229,7 +2229,7 @@ static struct hashmap *get_directory_renames(struct diff_queue_struct *pairs) if (!entry) { entry = xmalloc(sizeof(*entry)); dir_rename_entry_init(entry, old_dir); - hashmap_put(dir_renames, entry); + hashmap_put(dir_renames, &entry->ent); } else { free(old_dir); } @@ -2360,7 +2360,7 @@ static void compute_collisions(struct hashmap *collisions, sizeof(struct collision_entry)); hashmap_entry_init(&collision_ent->ent, strhash(new_path)); - hashmap_put(collisions, collision_ent); + hashmap_put(collisions, &collision_ent->ent); collision_ent->target_file = new_path; } else { free(new_path); -- cgit v1.2.3