summaryrefslogtreecommitdiff
path: root/builtin/difftool.c
diff options
context:
space:
mode:
authorLibravatar Eric Wong <e@80x24.org>2019-10-06 23:30:36 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-10-07 10:20:11 +0900
commitf23a465132a22860684ac66052cf9a954a18e27d (patch)
tree0af87116e641be6cc7f7dc75e1a337e917abc610 /builtin/difftool.c
parenthashmap: use *_entry APIs to wrap container_of (diff)
downloadtgif-f23a465132a22860684ac66052cf9a954a18e27d.tar.xz
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 <e@80x24.org> Reviewed-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/difftool.c')
-rw-r--r--builtin/difftool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/difftool.c b/builtin/difftool.c
index f41298d199..fa9c862e3a 100644
--- a/builtin/difftool.c
+++ b/builtin/difftool.c
@@ -162,7 +162,7 @@ static void add_left_or_right(struct hashmap *map, const char *path,
FLEX_ALLOC_STR(e, path, path);
hashmap_entry_init(&e->entry, strhash(path));
- existing = hashmap_get(map, &e->entry, NULL);
+ existing = hashmap_get_entry(map, e, NULL, struct pair_entry, entry);
if (existing) {
free(e);
e = existing;