Browse Source

Merge branch 'ak/use-hashmap-iter-first-in-submodule-config' into maint

Minor code cleanup.

* ak/use-hashmap-iter-first-in-submodule-config:
  submodule-config: use hashmap_iter_first()
maint
Junio C Hamano 9 years ago
parent
commit
a4708391d3
  1. 3
      submodule-config.c

3
submodule-config.c

@ -392,8 +392,7 @@ static const struct submodule *config_from(struct submodule_cache *cache, @@ -392,8 +392,7 @@ static const struct submodule *config_from(struct submodule_cache *cache,
struct hashmap_iter iter;
struct submodule_entry *entry;

hashmap_iter_init(&cache->for_name, &iter);
entry = hashmap_iter_next(&iter);
entry = hashmap_iter_first(&cache->for_name, &iter);
if (!entry)
return NULL;
return entry->config;

Loading…
Cancel
Save