hashmap_remove 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
b6c5241606
commit
28ee794128
@ -229,7 +229,7 @@ static void find_exact_matches(struct string_list *a, struct string_list *b)
|
||||
util->patch = b->items[i].string;
|
||||
util->diff = util->patch + util->diff_offset;
|
||||
hashmap_entry_init(&util->e, strhash(util->diff));
|
||||
other = hashmap_remove(&map, util, NULL);
|
||||
other = hashmap_remove(&map, &util->e, NULL);
|
||||
if (other) {
|
||||
if (other->matching >= 0)
|
||||
BUG("already assigned!");
|
||||
|
||||
Reference in New Issue
Block a user