From f23a465132a22860684ac66052cf9a954a18e27d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 6 Oct 2019 23:30:36 +0000 Subject: hashmap_get{,_from_hash} return "struct hashmap_entry *" Update callers to use hashmap_get_entry, hashmap_get_entry_from_hash or container_of as appropriate. This is another step towards eliminating the requirement of hashmap_entry being the first field in a struct. Signed-off-by: Eric Wong Reviewed-by: Derrick Stolee Signed-off-by: Junio C Hamano --- name-hash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'name-hash.c') diff --git a/name-hash.c b/name-hash.c index 73b83adf3d..aa8253ddd5 100644 --- a/name-hash.c +++ b/name-hash.c @@ -35,7 +35,8 @@ static struct dir_entry *find_dir_entry__hash(struct index_state *istate, struct dir_entry key; hashmap_entry_init(&key.ent, hash); key.namelen = namelen; - return hashmap_get(&istate->dir_hash, &key.ent, name); + return hashmap_get_entry(&istate->dir_hash, &key, name, + struct dir_entry, ent); } static struct dir_entry *find_dir_entry(struct index_state *istate, -- cgit v1.2.3