Skip to content

Commit 0068ced

Browse files
stefanbellergitster
authored andcommitted
builtin/describe: drop hashmap_cmp_fn cast
Signed-off-by: Stefan Beller <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7db316b commit 0068ced

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

builtin/describe.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,13 @@ static const char *prio_names[] = {
5555
};
5656

5757
static int commit_name_cmp(const void *unused_cmp_data,
58-
const struct commit_name *cn1,
59-
const struct commit_name *cn2,
58+
const void *entry,
59+
const void *entry_or_key,
6060
const void *peeled)
6161
{
62+
const struct commit_name *cn1 = entry;
63+
const struct commit_name *cn2 = entry_or_key;
64+
6265
return oidcmp(&cn1->peeled, peeled ? peeled : &cn2->peeled);
6366
}
6467

@@ -503,7 +506,7 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
503506
return cmd_name_rev(args.argc, args.argv, prefix);
504507
}
505508

506-
hashmap_init(&names, (hashmap_cmp_fn) commit_name_cmp, NULL, 0);
509+
hashmap_init(&names, commit_name_cmp, NULL, 0);
507510
for_each_rawref(get_name, NULL);
508511
if (!names.size && !always)
509512
die(_("No names found, cannot describe anything."));

0 commit comments

Comments
 (0)