summaryrefslogtreecommitdiff
path: root/range-diff.c
diff options
context:
space:
mode:
authorLibravatar Eric Wong <e@80x24.org>2019-10-06 23:30:31 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-10-07 10:20:10 +0900
commit28ee7941280828f9e528bd8c5d0f6515a57e0c44 (patch)
tree8ccc5bad88aad148e83cccfd1835752188d8640a /range-diff.c
parenthashmap_get takes "const struct hashmap_entry *" (diff)
downloadtgif-28ee7941280828f9e528bd8c5d0f6515a57e0c44.tar.xz
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>
Diffstat (limited to 'range-diff.c')
-rw-r--r--range-diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/range-diff.c b/range-diff.c
index 96f955d84d..c51cfd5556 100644
--- a/range-diff.c
+++ b/range-diff.c
@@ -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!");