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 <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
d22245a2e3
commit
f6eb6bdcf2
@ -710,7 +710,7 @@ struct cache_entry *index_file_exists(struct index_state *istate, const char *na
|
||||
while (ce) {
|
||||
if (same_name(ce, name, namelen, icase))
|
||||
return ce;
|
||||
ce = hashmap_get_next(&istate->name_hash, ce);
|
||||
ce = hashmap_get_next(&istate->name_hash, &ce->ent);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user