Commit e4fda954 by Russell Belfer

A little git_config_get_multivar code cleanup

parent 7b5c0d18
...@@ -534,8 +534,7 @@ int git_config_get_multivar( ...@@ -534,8 +534,7 @@ int git_config_get_multivar(
{ {
file_internal *internal; file_internal *internal;
git_config_backend *file; git_config_backend *file;
int ret = GIT_ENOTFOUND; int ret = GIT_ENOTFOUND, err;
int err;
size_t i; size_t i;
/* /*
...@@ -548,15 +547,10 @@ int git_config_get_multivar( ...@@ -548,15 +547,10 @@ int git_config_get_multivar(
continue; continue;
file = internal->file; file = internal->file;
err = file->get_multivar(file, name, regexp, cb, payload); if (!(err = file->get_multivar(file, name, regexp, cb, payload)))
switch (err) { ret = 0;
case GIT_OK: else if (err != GIT_ENOTFOUND)
ret = GIT_OK; return err;
case GIT_ENOTFOUND:
break;
default:
return err;
}
} }
return (ret == GIT_ENOTFOUND) ? config_error_notfound(name) : 0; return (ret == GIT_ENOTFOUND) ? config_error_notfound(name) : 0;
......
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