]> git.ipfire.org Git - thirdparty/git.git/blobdiff - ref-filter.c
hashmap_cmp_fn takes hashmap_entry params
[thirdparty/git.git] / ref-filter.c
index 9999426914773af314a0c6c72016a3313ee91ee2..4613df8826818380f2b2554fce7fe409c0de0c56 100644 (file)
@@ -84,12 +84,15 @@ struct ref_to_worktree_entry {
 };
 
 static int ref_to_worktree_map_cmpfnc(const void *unused_lookupdata,
-                                     const void *existing_hashmap_entry_to_test,
-                                     const void *key,
+                                     const struct hashmap_entry *eptr,
+                                     const struct hashmap_entry *kptr,
                                      const void *keydata_aka_refname)
 {
-       const struct ref_to_worktree_entry *e = existing_hashmap_entry_to_test;
-       const struct ref_to_worktree_entry *k = key;
+       const struct ref_to_worktree_entry *e, *k;
+
+       e = container_of(eptr, const struct ref_to_worktree_entry, ent);
+       k = container_of(kptr, const struct ref_to_worktree_entry, ent);
+
        return strcmp(e->wt->head_ref,
                keydata_aka_refname ? keydata_aka_refname : k->wt->head_ref);
 }