Thread (4 messages) flat view 4 messages, 4 authors, 2016-06-15
DORMANTno replies REVIEWED: 1 (0M)

1 review trailer.

[PATCH v2] submodule-config: use hashmap_iter_first()

From: Alexander Kuleshov <hidden>
Date: 2016-06-15 23:08:45
Subsystem: the rest · Maintainer: Linus Torvalds

from the <hashmap.h> for simplification.

Signed-off-by: Alexander Kuleshov <redacted>
Reviewed-by: Stefan Beller <redacted>
---
Changelog: added missed Signof-off-by and function name fixed
in the commit message.

 submodule-config.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/submodule-config.c b/submodule-config.c
index b82d1fb..8ac5031 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;
-- 
2.8.0.rc2.216.g1477fb2.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help