Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-10-07 02:30:32 +0300
committerJunio C Hamano <gitster@pobox.com>2019-10-07 04:20:10 +0300
commit26b455f21ed7e0c7b0e4e4e69b5ae48545597020 (patch)
tree0c0a69083353100d2f637322791f4499e8cb27bf /hashmap.c
parent28ee7941280828f9e528bd8c5d0f6515a57e0c44 (diff)
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 'hashmap.c')
-rw-r--r--hashmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hashmap.c b/hashmap.c
index bdf33e0381..9b83e73d03 100644
--- a/hashmap.c
+++ b/hashmap.c
@@ -241,7 +241,7 @@ void *hashmap_remove(struct hashmap *map, const struct hashmap_entry *key,
return old;
}
-void *hashmap_put(struct hashmap *map, void *entry)
+void *hashmap_put(struct hashmap *map, struct hashmap_entry *entry)
{
struct hashmap_entry *old = hashmap_remove(map, entry, NULL);
hashmap_add(map, entry);