From 8a973d0bb398d6d83d6c048acecc750d01bd7234 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 6 Oct 2019 23:30:39 +0000 Subject: hashmap: hashmap_{put,remove} return hashmap_entry * And add *_entry variants to perform container_of as necessary to simplify most callers. Signed-off-by: Eric Wong Reviewed-by: Derrick Stolee Signed-off-by: Junio C Hamano --- submodule-config.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'submodule-config.c') diff --git a/submodule-config.c b/submodule-config.c index 5319933e1d..a289d195f6 100644 --- a/submodule-config.c +++ b/submodule-config.c @@ -141,7 +141,9 @@ static void cache_remove_path(struct submodule_cache *cache, struct submodule_entry *removed; hashmap_entry_init(&e.ent, hash); e.config = submodule; - removed = hashmap_remove(&cache->for_path, &e.ent, NULL); + removed = hashmap_remove_entry(&cache->for_path, &e, NULL, + struct submodule_entry, + ent /* member name */); free(removed); } -- cgit v1.2.3