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 --- hashmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hashmap.c') diff --git a/hashmap.c b/hashmap.c index bdf33e0381..9b83e73d03 100644 --- a/hashmap.c +++ b/hashmap.c @@ -241,7 +241,7 @@ void *hashmap_remove(struct hashmap *map, const struct hashmap_entry *key, return old; } -void *hashmap_put(struct hashmap *map, void *entry) +void *hashmap_put(struct hashmap *map, struct hashmap_entry *entry) { struct hashmap_entry *old = hashmap_remove(map, entry, NULL); hashmap_add(map, entry); -- cgit v1.2.3