From 28ee7941280828f9e528bd8c5d0f6515a57e0c44 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 6 Oct 2019 23:30:31 +0000 Subject: hashmap_remove takes "const struct hashmap_entry *" This is less error-prone than "const 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hashmap.c') diff --git a/hashmap.c b/hashmap.c index 092236c09a..bdf33e0381 100644 --- a/hashmap.c +++ b/hashmap.c @@ -218,7 +218,8 @@ void hashmap_add(struct hashmap *map, struct hashmap_entry *entry) } } -void *hashmap_remove(struct hashmap *map, const void *key, const void *keydata) +void *hashmap_remove(struct hashmap *map, const struct hashmap_entry *key, + const void *keydata) { struct hashmap_entry *old; struct hashmap_entry **e = find_entry_ptr(map, key, keydata); -- cgit v1.2.3