From f6eb6bdcf2719defc3d38e0e2712fa3e18d29e91 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 6 Oct 2019 23:30:28 +0000 Subject: hashmap_get_next 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.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hashmap.h') diff --git a/hashmap.h b/hashmap.h index 54b0b8c698..93fb9599ca 100644 --- a/hashmap.h +++ b/hashmap.h @@ -318,7 +318,8 @@ static inline void *hashmap_get_from_hash(const struct hashmap *map, * `entry` is the hashmap_entry to start the search from, obtained via a previous * call to `hashmap_get` or `hashmap_get_next`. */ -void *hashmap_get_next(const struct hashmap *map, const void *entry); +void *hashmap_get_next(const struct hashmap *map, + const struct hashmap_entry *entry); /* * Adds a hashmap entry. This allows to add duplicate entries (i.e. -- cgit v1.2.3