зеркало из https://github.com/microsoft/git.git
convert/sub-process: drop cast to hashmap_cmp_fn
Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
77bdc09786
Коммит
9ab42958f6
|
@ -583,8 +583,7 @@ static int apply_multi_file_filter(const char *path, const char *src, size_t len
|
|||
|
||||
if (!subprocess_map_initialized) {
|
||||
subprocess_map_initialized = 1;
|
||||
hashmap_init(&subprocess_map, (hashmap_cmp_fn) cmd2process_cmp,
|
||||
NULL, 0);
|
||||
hashmap_init(&subprocess_map, cmd2process_cmp, NULL, 0);
|
||||
entry = NULL;
|
||||
} else {
|
||||
entry = (struct cmd2process *)subprocess_find_entry(&subprocess_map, cmd);
|
||||
|
|
|
@ -6,10 +6,13 @@
|
|||
#include "pkt-line.h"
|
||||
|
||||
int cmd2process_cmp(const void *unused_cmp_data,
|
||||
const struct subprocess_entry *e1,
|
||||
const struct subprocess_entry *e2,
|
||||
const void *entry,
|
||||
const void *entry_or_key,
|
||||
const void *unused_keydata)
|
||||
{
|
||||
const struct subprocess_entry *e1 = entry;
|
||||
const struct subprocess_entry *e2 = entry_or_key;
|
||||
|
||||
return strcmp(e1->cmd, e2->cmd);
|
||||
}
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@ struct subprocess_entry {
|
|||
/* subprocess functions */
|
||||
|
||||
extern int cmd2process_cmp(const void *unused_cmp_data,
|
||||
const struct subprocess_entry *e1,
|
||||
const struct subprocess_entry *e2,
|
||||
const void *e1,
|
||||
const void *e2,
|
||||
const void *unused_keydata);
|
||||
|
||||
typedef int(*subprocess_start_fn)(struct subprocess_entry *entry);
|
||||
|
|
Загрузка…
Ссылка в новой задаче