@@ -35,27 +35,33 @@ static struct submodule_cache the_submodule_cache;
35
35
static int is_cache_init ;
36
36
37
37
static int config_path_cmp (const void * unused_cmp_data ,
38
- const struct submodule_entry * a ,
39
- const struct submodule_entry * b ,
38
+ const void * entry ,
39
+ const void * entry_or_key ,
40
40
const void * unused_keydata )
41
41
{
42
+ const struct submodule_entry * a = entry ;
43
+ const struct submodule_entry * b = entry_or_key ;
44
+
42
45
return strcmp (a -> config -> path , b -> config -> path ) ||
43
46
hashcmp (a -> config -> gitmodules_sha1 , b -> config -> gitmodules_sha1 );
44
47
}
45
48
46
49
static int config_name_cmp (const void * unused_cmp_data ,
47
- const struct submodule_entry * a ,
48
- const struct submodule_entry * b ,
50
+ const void * entry ,
51
+ const void * entry_or_key ,
49
52
const void * unused_keydata )
50
53
{
54
+ const struct submodule_entry * a = entry ;
55
+ const struct submodule_entry * b = entry_or_key ;
56
+
51
57
return strcmp (a -> config -> name , b -> config -> name ) ||
52
58
hashcmp (a -> config -> gitmodules_sha1 , b -> config -> gitmodules_sha1 );
53
59
}
54
60
55
61
static void cache_init (struct submodule_cache * cache )
56
62
{
57
- hashmap_init (& cache -> for_path , ( hashmap_cmp_fn ) config_path_cmp , NULL , 0 );
58
- hashmap_init (& cache -> for_name , ( hashmap_cmp_fn ) config_name_cmp , NULL , 0 );
63
+ hashmap_init (& cache -> for_path , config_path_cmp , NULL , 0 );
64
+ hashmap_init (& cache -> for_name , config_name_cmp , NULL , 0 );
59
65
}
60
66
61
67
static void free_one_config (struct submodule_entry * entry )
0 commit comments