@@ -35,27 +35,33 @@ static struct submodule_cache the_submodule_cache;
3535static int is_cache_init ;
3636
3737static 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 ,
4040 const void * unused_keydata )
4141{
42+ const struct submodule_entry * a = entry ;
43+ const struct submodule_entry * b = entry_or_key ;
44+
4245 return strcmp (a -> config -> path , b -> config -> path ) ||
4346 hashcmp (a -> config -> gitmodules_sha1 , b -> config -> gitmodules_sha1 );
4447}
4548
4649static 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 ,
4952 const void * unused_keydata )
5053{
54+ const struct submodule_entry * a = entry ;
55+ const struct submodule_entry * b = entry_or_key ;
56+
5157 return strcmp (a -> config -> name , b -> config -> name ) ||
5258 hashcmp (a -> config -> gitmodules_sha1 , b -> config -> gitmodules_sha1 );
5359}
5460
5561static void cache_init (struct submodule_cache * cache )
5662{
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 );
5965}
6066
6167static void free_one_config (struct submodule_entry * entry )
0 commit comments