hashmap: remove type arg from hashmap_{get,put,remove}_entry
Since these macros already take a `keyvar' pointer of a known type, we can rely on OFFSETOF_VAR to get the correct offset without relying on non-portable `__typeof__' and `offsetof'. Argument order is also rearranged, so `keyvar' and `member' are sequential as they are used as: `keyvar->member' Signed-off-by: Eric Wong <e@80x24.org> Reviewed-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
23dee69f53
commit
404ab78e39
@ -24,8 +24,7 @@ struct subprocess_entry *subprocess_find_entry(struct hashmap *hashmap, const ch
|
||||
|
||||
hashmap_entry_init(&key.ent, strhash(cmd));
|
||||
key.cmd = cmd;
|
||||
return hashmap_get_entry(hashmap, &key, NULL,
|
||||
struct subprocess_entry, ent);
|
||||
return hashmap_get_entry(hashmap, &key, ent, NULL);
|
||||
}
|
||||
|
||||
int subprocess_read_status(int fd, struct strbuf *status)
|
||||
|
Reference in New Issue
Block a user