From 26b455f21ed7e0c7b0e4e4e69b5ae48545597020 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 6 Oct 2019 23:30:32 +0000 Subject: hashmap_put takes "struct hashmap_entry *" This is less error-prone than "void *" as the compiler now detects invalid types being passed. Signed-off-by: Eric Wong Reviewed-by: Derrick Stolee Signed-off-by: Junio C Hamano --- t/helper/test-hashmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/helper/test-hashmap.c') diff --git a/t/helper/test-hashmap.c b/t/helper/test-hashmap.c index 49e715f1cd..de2bd083b9 100644 --- a/t/helper/test-hashmap.c +++ b/t/helper/test-hashmap.c @@ -187,7 +187,7 @@ int cmd__hashmap(int argc, const char **argv) entry = alloc_test_entry(hash, p1, p2); /* add / replace entry */ - entry = hashmap_put(&map, entry); + entry = hashmap_put(&map, &entry->ent); /* print and free replaced entry, if any */ puts(entry ? get_value(entry) : "NULL"); -- cgit v1.2.3