Commit a4b332e8 by Etienne Samson Committed by Edward Thomson

submodule: grab the error while loading from config

Previously, an error in `git_config_next` would be mistaken as a
successful load, because the previous call would have succeeded.
Coverity saw the subsequent check for a completed iteration as dead, so
let's make it useful again.

CID 1391374
parent 313440c3
...@@ -181,7 +181,7 @@ static int load_submodule_names(git_strmap *out, git_repository *repo, git_confi ...@@ -181,7 +181,7 @@ static int load_submodule_names(git_strmap *out, git_repository *repo, git_confi
if ((error = git_config_iterator_glob_new(&iter, cfg, key)) < 0) if ((error = git_config_iterator_glob_new(&iter, cfg, key)) < 0)
return error; return error;
while (git_config_next(&entry, iter) == 0) { while ((error = git_config_next(&entry, iter)) == 0) {
const char *fdot, *ldot; const char *fdot, *ldot;
fdot = strchr(entry->name, '.'); fdot = strchr(entry->name, '.');
ldot = strrchr(entry->name, '.'); ldot = strrchr(entry->name, '.');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment