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:
Eric Wong
2019-10-06 23:30:28 +00:00
committed by Junio C Hamano
parent d22245a2e3
commit f6eb6bdcf2
6 changed files with 11 additions and 8 deletions

View File

@ -285,7 +285,7 @@ static int find_identical_files(struct hashmap *srcs,
p = hashmap_get_from_hash(srcs,
hash_filespec(options->repo, target),
NULL);
for (; p; p = hashmap_get_next(srcs, p)) {
for (; p; p = hashmap_get_next(srcs, &p->entry)) {
int score;
struct diff_filespec *source = p->filespec;