Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-10-07 02:30:42 +0300
committerJunio C Hamano <gitster@pobox.com>2019-10-07 04:20:12 +0300
commit404ab78e39fc74c4eb604b6003642ed264f687a6 (patch)
tree54cea276f612f84304b9420257a8a667d02ccbbe /hashmap.c
parent23dee69f53cf5024ca79e0b707dcb03c63f33bef (diff)
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>
Diffstat (limited to 'hashmap.c')
-rw-r--r--hashmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hashmap.c b/hashmap.c
index 65b447f6cd..39c13110bc 100644
--- a/hashmap.c
+++ b/hashmap.c
@@ -311,7 +311,7 @@ const void *memintern(const void *data, size_t len)
/* lookup interned string in pool */
hashmap_entry_init(&key.ent, memhash(data, len));
key.len = len;
- e = hashmap_get_entry(&map, &key, data, struct pool_entry, ent);
+ e = hashmap_get_entry(&map, &key, ent, data);
if (!e) {
/* not found: create it */
FLEX_ALLOC_MEM(e, data, data, len);