summaryrefslogtreecommitdiff
path: root/name-hash.c
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-10-06 23:30:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-10-07 01:20:10 (GMT)
commitf6eb6bdcf2719defc3d38e0e2712fa3e18d29e91 (patch)
treec66cbc464d075f07fedf1ab338a33fbc66c46638 /name-hash.c
parentd22245a2e360d2e708ca37169be8eb5a5899b98d (diff)
downloadgit-f6eb6bdcf2719defc3d38e0e2712fa3e18d29e91.zip
git-f6eb6bdcf2719defc3d38e0e2712fa3e18d29e91.tar.gz
git-f6eb6bdcf2719defc3d38e0e2712fa3e18d29e91.tar.bz2
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>
Diffstat (limited to 'name-hash.c')
-rw-r--r--name-hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/name-hash.c b/name-hash.c
index 1ce1417..4d84326 100644
--- a/name-hash.c
+++ b/name-hash.c
@@ -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;
}