Re: [PATCH] submodule-config: use hashmap_iter_init()
- From
Stefan Beller <sbeller@google.com>
- Date
- Mar 15, 2016, 19:08 UTC
- Message-ID
- <CAGZ79kZH_xzfvo=cP_+BdsqpthwQUKkJjo7OawkpFN9y+jm_+w@mail.gmail.com>
- In-Reply-To
- <CAPig+cR6Cy2MHvoTxNa89gZx9qJZW1Rv93N+wcwK2JRGkUBzRw@mail.gmail.com>
On Tue, Mar 15, 2016 at 11:58 AM, Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 24 quoted lines
> On Tue, Mar 15, 2016 at 2:25 PM, Alexander Kuleshov > <kuleshovmail@gmail.com> wrote: >> submodule-config: use hashmap_iter_init() > > Did you mean s/init/first/ ? > >> from the <hashmap.h> for simplification. > > Sentence fragment... > > Missing sign-off. > >> --- >> 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);
The change looks correct to me. But as Eric said, the commit message needs work and a sign off. With that, Reviewed-by: Stefan Beller <sbeller@google.com>
Thanks, Stefan