Merge branch 'sb/misc-cleanups'

* sb/misc-cleanups:
  submodule-config: don't shadow `cache`
  config.c: drop local variable
This commit is contained in:
Junio C Hamano
2016-05-10 13:40:29 -07:00
2 changed files with 7 additions and 10 deletions

View File

@ -1309,14 +1309,11 @@ static struct config_set_element *configset_find_element(struct config_set *cs,
struct config_set_element k;
struct config_set_element *found_entry;
char *normalized_key;
int ret;
/*
* `key` may come from the user, so normalize it before using it
* for querying entries from the hashmap.
*/
ret = git_config_parse_key(key, &normalized_key, NULL);
if (ret)
if (git_config_parse_key(key, &normalized_key, NULL))
return NULL;
hashmap_entry_init(&k, strhash(normalized_key));