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;
entry->index = index;
entry->filespec = filespec;
- hashmap_entry_init(entry, hash_filespec(r, filespec));
+ hashmap_entry_init(&entry->entry, hash_filespec(r, filespec));
hashmap_add(table, entry);
}