Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
config.c: drop hashmap_cmp_fn cast
author
Stefan Beller
<sbeller@google.com>
Sat, 1 Jul 2017 00:28:32 +0000
(17:28 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 5 Jul 2017 20:53:12 +0000
(13:53 -0700)
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (from parent 1:
0068ced
)
diff --git
a/config.c
b/config.c
index 4a31e31ac30f8552e5116f319fecb8cf76182938..30ff700629a72f87977369bccefa5be382fd7257 100644
(file)
--- a/
config.c
+++ b/
config.c
@@
-1754,17
+1754,19
@@
static int configset_add_value(struct config_set *cs, const char *key, const cha
}
static int config_set_element_cmp(const void *unused_cmp_data,
}
static int config_set_element_cmp(const void *unused_cmp_data,
- const
struct config_set_element *e1
,
- const
struct config_set_element *e2
,
+ const
void *entry
,
+ const
void *entry_or_key
,
const void *unused_keydata)
{
const void *unused_keydata)
{
+ const struct config_set_element *e1 = entry;
+ const struct config_set_element *e2 = entry_or_key;
+
return strcmp(e1->key, e2->key);
}
void git_configset_init(struct config_set *cs)
{
return strcmp(e1->key, e2->key);
}
void git_configset_init(struct config_set *cs)
{
- hashmap_init(&cs->config_hash, (hashmap_cmp_fn)config_set_element_cmp,
- NULL, 0);
+ hashmap_init(&cs->config_hash, config_set_element_cmp, NULL, 0);
cs->hash_initialized = 1;
cs->list.nr = 0;
cs->list.alloc = 0;
cs->hash_initialized = 1;
cs->list.nr = 0;
cs->list.alloc = 0;