summaryrefslogtreecommitdiff
path: root/builtin/describe.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2017-07-01 00:28:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-07-05 20:53:12 (GMT)
commit0068cede4a753cec0ec5f290bacb1fb22a8f9e58 (patch)
treed6150fda4d263277a35112da28f6b93ac45a2ab6 /builtin/describe.c
parent7db316bcbef06025b8254a4d5ae3fe2c6237ec18 (diff)
downloadgit-0068cede4a753cec0ec5f290bacb1fb22a8f9e58.zip
git-0068cede4a753cec0ec5f290bacb1fb22a8f9e58.tar.gz
git-0068cede4a753cec0ec5f290bacb1fb22a8f9e58.tar.bz2
builtin/describe: drop hashmap_cmp_fn cast
Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/describe.c')
-rw-r--r--builtin/describe.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/builtin/describe.c b/builtin/describe.c
index 8868f00..f2f2edf 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -55,10 +55,13 @@ static const char *prio_names[] = {
};
static int commit_name_cmp(const void *unused_cmp_data,
- const struct commit_name *cn1,
- const struct commit_name *cn2,
+ const void *entry,
+ const void *entry_or_key,
const void *peeled)
{
+ const struct commit_name *cn1 = entry;
+ const struct commit_name *cn2 = entry_or_key;
+
return oidcmp(&cn1->peeled, peeled ? peeled : &cn2->peeled);
}
@@ -503,7 +506,7 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
return cmd_name_rev(args.argc, args.argv, prefix);
}
- hashmap_init(&names, (hashmap_cmp_fn) commit_name_cmp, NULL, 0);
+ hashmap_init(&names, commit_name_cmp, NULL, 0);
for_each_rawref(get_name, NULL);
if (!names.size && !always)
die(_("No names found, cannot describe anything."));