]> git.ipfire.org Git - thirdparty/git.git/blobdiff - hashmap.c
hashmap_get_next takes "const struct hashmap_entry *"
[thirdparty/git.git] / hashmap.c
index 6818c65174869406f57fc0cea79fda4af8c63938..c1de40eea0aa1e1f5b99d7626c0f6988b6ba2ffc 100644 (file)
--- a/hashmap.c
+++ b/hashmap.c
@@ -191,9 +191,10 @@ void *hashmap_get(const struct hashmap *map, const void *key, const void *keydat
        return *find_entry_ptr(map, key, keydata);
 }
 
-void *hashmap_get_next(const struct hashmap *map, const void *entry)
+void *hashmap_get_next(const struct hashmap *map,
+                       const struct hashmap_entry *entry)
 {
-       struct hashmap_entry *e = ((struct hashmap_entry *) entry)->next;
+       struct hashmap_entry *e = entry->next;
        for (; e; e = e->next)
                if (entry_equals(map, entry, e, NULL))
                        return e;