summaryrefslogtreecommitdiff
path: root/t/helper/test-hashmap.c
diff options
context:
space:
mode:
authorLibravatar Eric Wong <e@80x24.org>2019-10-06 23:30:28 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-10-07 10:20:10 +0900
commitf6eb6bdcf2719defc3d38e0e2712fa3e18d29e91 (patch)
treec66cbc464d075f07fedf1ab338a33fbc66c46638 /t/helper/test-hashmap.c
parenthashmap_entry_init takes "struct hashmap_entry *" (diff)
downloadtgif-f6eb6bdcf2719defc3d38e0e2712fa3e18d29e91.tar.xz
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 't/helper/test-hashmap.c')
-rw-r--r--t/helper/test-hashmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/helper/test-hashmap.c b/t/helper/test-hashmap.c
index 0c9fd7c996..bf063a2521 100644
--- a/t/helper/test-hashmap.c
+++ b/t/helper/test-hashmap.c
@@ -203,7 +203,7 @@ int cmd__hashmap(int argc, const char **argv)
puts("NULL");
while (entry) {
puts(get_value(entry));
- entry = hashmap_get_next(&map, entry);
+ entry = hashmap_get_next(&map, &entry->ent);
}
} else if (!strcmp("remove", cmd) && p1) {