diff options
author | Eric Wong <e@80x24.org> | 2019-10-07 01:30:32 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-10-07 03:20:10 +0200 |
commit | 26b455f21ed7e0c7b0e4e4e69b5ae48545597020 (patch) | |
tree | 0c0a69083353100d2f637322791f4499e8cb27bf /submodule-config.c | |
parent | hashmap_remove takes "const struct hashmap_entry *" (diff) | |
download | git-26b455f21ed7e0c7b0e4e4e69b5ae48545597020.tar.xz git-26b455f21ed7e0c7b0e4e4e69b5ae48545597020.zip |
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 'submodule-config.c')
-rw-r--r-- | submodule-config.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/submodule-config.c b/submodule-config.c index 7486745a6a..9248c5ea5b 100644 --- a/submodule-config.c +++ b/submodule-config.c @@ -125,7 +125,7 @@ static void cache_put_path(struct submodule_cache *cache, struct submodule_entry *e = xmalloc(sizeof(*e)); hashmap_entry_init(&e->ent, hash); e->config = submodule; - hashmap_put(&cache->for_path, e); + hashmap_put(&cache->for_path, &e->ent); } static void cache_remove_path(struct submodule_cache *cache, |