vim-patch:partial:9.0.1237: code is indented more than necessary (#21971)

Problem:    Code is indented more than necessary.
Solution:   Use an early return where it makes sense. (Yegappan Lakshmanan,
            closes vim/vim#11858)

6ec6666047

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
zeertzjq
2023-01-24 08:43:51 +08:00
committed by GitHub
parent dbb6c7f1b8
commit fa12b9ca2b
11 changed files with 559 additions and 491 deletions

View File

@@ -821,12 +821,14 @@ static void source_all_matches(char *pat)
int num_files;
char **files;
if (gen_expand_wildcards(1, &pat, &num_files, &files, EW_FILE) == OK) {
for (int i = 0; i < num_files; i++) {
(void)do_source(files[i], false, DOSO_NONE);
}
FreeWild(num_files, files);
if (gen_expand_wildcards(1, &pat, &num_files, &files, EW_FILE) != OK) {
return;
}
for (int i = 0; i < num_files; i++) {
(void)do_source(files[i], false, DOSO_NONE);
}
FreeWild(num_files, files);
}
/// Add the package directory to 'runtimepath'