summaryrefslogtreecommitdiff
path: root/submodule-config.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-04-13 14:12:29 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-04-13 14:12:29 -0700
commit73385f20e14be779f06177fb9f307d63662d36d1 (patch)
tree12b84aadba3655573c0f632a69691de82684a64a /submodule-config.c
parentMerge branch 'jk/check-repository-format' (diff)
parentsubmodule-config: use hashmap_iter_first() (diff)
downloadtgif-73385f20e14be779f06177fb9f307d63662d36d1.tar.xz
Merge branch 'ak/use-hashmap-iter-first-in-submodule-config'
Minor code cleanup. * ak/use-hashmap-iter-first-in-submodule-config: submodule-config: use hashmap_iter_first()
Diffstat (limited to 'submodule-config.c')
-rw-r--r--submodule-config.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/submodule-config.c b/submodule-config.c
index b82d1fbb22..8ac5031ade 100644
--- a/submodule-config.c
+++ b/submodule-config.c
@@ -405,8 +405,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;