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
@ -153,7 +153,7 @@ static void paths_and_oids_insert(struct hashmap *map,
|
||||
hashmap_entry_init(&entry->ent, hash);
|
||||
entry->path = xstrdup(key.path);
|
||||
oidset_init(&entry->trees, 16);
|
||||
hashmap_put(map, entry);
|
||||
hashmap_put(map, &entry->ent);
|
||||
}
|
||||
|
||||
oidset_insert(&entry->trees, oid);
|
||||
|
Reference in New Issue
Block a user