mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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 <e@80x24.org> Reviewed-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
28ee794128
commit
26b455f21e
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user