From 404ab78e39fc74c4eb604b6003642ed264f687a6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 6 Oct 2019 23:30:42 +0000 Subject: 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 Reviewed-by: Derrick Stolee Signed-off-by: Junio C Hamano --- patch-ids.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'patch-ids.c') diff --git a/patch-ids.c b/patch-ids.c index af17828e33..12aa6d494b 100644 --- a/patch-ids.c +++ b/patch-ids.c @@ -101,8 +101,7 @@ struct patch_id *has_commit_patch_id(struct commit *commit, if (init_patch_id_entry(&patch, commit, ids)) return NULL; - return hashmap_get_entry(&ids->patches, &patch, NULL, - struct patch_id, ent); + return hashmap_get_entry(&ids->patches, &patch, ent, NULL); } struct patch_id *add_commit_patch_id(struct commit *commit, -- cgit v1.2.3