]> git.ipfire.org Git - thirdparty/git.git/blobdiff - submodule-config.c
Merge branch 'sg/commit-graph-usage-fix'
[thirdparty/git.git] / submodule-config.c
index 5462acc8ecbb204f110941775a5ae696f6e6c7e0..401a9b238254385aae6f801eabbef6442d4b9292 100644 (file)
@@ -100,7 +100,7 @@ static void submodule_cache_clear(struct submodule_cache *cache)
         * their .gitmodules blob sha1 and submodule name.
         */
        hashmap_for_each_entry(&cache->for_name, &iter, entry,
-                               struct submodule_entry, ent /* member name */)
+                               ent /* member name */)
                free_one_config(entry);
 
        hashmap_free_entries(&cache->for_path, struct submodule_entry, ent);
@@ -141,9 +141,7 @@ static void cache_remove_path(struct submodule_cache *cache,
        struct submodule_entry *removed;
        hashmap_entry_init(&e.ent, hash);
        e.config = submodule;
-       removed = hashmap_remove_entry(&cache->for_path, &e, NULL,
-                                       struct submodule_entry,
-                                       ent /* member name */);
+       removed = hashmap_remove_entry(&cache->for_path, &e, ent, NULL);
        free(removed);
 }
 
@@ -172,8 +170,7 @@ static const struct submodule *cache_lookup_path(struct submodule_cache *cache,
        hashmap_entry_init(&key.ent, hash);
        key.config = &key_config;
 
-       entry = hashmap_get_entry(&cache->for_path, &key, NULL,
-                               struct submodule_entry, ent);
+       entry = hashmap_get_entry(&cache->for_path, &key, ent, NULL);
        if (entry)
                return entry->config;
        return NULL;
@@ -193,8 +190,7 @@ static struct submodule *cache_lookup_name(struct submodule_cache *cache,
        hashmap_entry_init(&key.ent, hash);
        key.config = &key_config;
 
-       entry = hashmap_get_entry(&cache->for_name, &key, NULL,
-                               struct submodule_entry, ent);
+       entry = hashmap_get_entry(&cache->for_name, &key, ent, NULL);
        if (entry)
                return entry->config;
        return NULL;