Skip to contentSkip to conversation

submodule-config: use hashmap_iter_init()

PATCH Superseded Alexander Kuleshov 3 participants 4 messages Jun 15, 2016

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 submodule-config: use hashmap_iter_init()

from the <hashmap.h> for simplification.

---
 submodule-config.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
submodule-config.c +1 -2
index b82d1fb..8ac5031 100644
@@ -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;
Signature · 1 line
2.8.0.rc2.216.g1477fb2.dirty
#1 lore raw
Quoted 1 line · Alexander Kuleshov

submodule-config: use hashmap_iter_init()

Did you mean s/init/first/ ?

Quoted 1 line

from the <hashmap.h> for simplification.

Sentence fragment...

Missing sign-off.

Quoted 16 lines

---

submodule-config.c +1 -3
index b82d1fb..8ac5031 100644
@@ -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;
--
Reviewed-by
#2 lore raw
Quoted 21 lines · Eric Sunshine
Quoted 1 line · Alexander Kuleshov

submodule-config: use hashmap_iter_init()

Did you mean s/init/first/ ?

Quoted 1 line

from the <hashmap.h> for simplification.

Sentence fragment...

Missing sign-off.

Quoted 9 lines

---

submodule-config.c +0 -0
index b82d1fb..8ac5031 100644
@@ -405,8 +405,7 @@ static const struct submodule *config_from(struct submodule_cache *cache,
                struct hashmap_iter iter;
                struct submodule_entry *entry;
 
Quoted 3 lines

submodule-config.c static const struct submodule *config_from(struct submodule_cache *cache, · line 408

Quoted 3 lines
submodule-config.c +1 -2
-               hashmap_iter_init(&cache->for_name, &iter);
-               entry = hashmap_iter_next(&iter);
+               entry = hashmap_iter_first(&cache->for_name, &iter);

The change looks correct to me. But as Eric said, the commit message needs work and a sign off. With that,

Thanks,
Stefan

#3 lore raw
Quoted 3 lines · Stefan Beller

The change looks correct to me. But as Eric said, the commit message needs work and a sign off. With that,

Ah, yes, forgot to pass -s to commit command. Sorry for noise guys, will resend
the patch.