summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-10-06 23:30:32 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-10-07 01:20:10 (GMT)
commit26b455f21ed7e0c7b0e4e4e69b5ae48545597020 (patch)
tree0c0a69083353100d2f637322791f4499e8cb27bf /t
parent28ee7941280828f9e528bd8c5d0f6515a57e0c44 (diff)
downloadgit-26b455f21ed7e0c7b0e4e4e69b5ae48545597020.zip
git-26b455f21ed7e0c7b0e4e4e69b5ae48545597020.tar.gz
git-26b455f21ed7e0c7b0e4e4e69b5ae48545597020.tar.bz2
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 <e@80x24.org> Reviewed-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-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 49e715f..de2bd08 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");