mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 16:58:17 +00:00
path.c: Fulfill the @returns
conditions
Original-author: oni-link <knil.ino@gmail.com>
This commit is contained in:
@@ -1118,7 +1118,6 @@ int gen_expand_wildcards(int num_pat, char_u **pat, int *num_file,
|
|||||||
char_u *p;
|
char_u *p;
|
||||||
static bool recursive = false;
|
static bool recursive = false;
|
||||||
int add_pat;
|
int add_pat;
|
||||||
bool retval = OK;
|
|
||||||
bool did_expand_in_path = false;
|
bool did_expand_in_path = false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1163,7 +1162,11 @@ int gen_expand_wildcards(int num_pat, char_u **pat, int *num_file,
|
|||||||
if (vim_backtick(p)) {
|
if (vim_backtick(p)) {
|
||||||
add_pat = expand_backtick(&ga, p, flags);
|
add_pat = expand_backtick(&ga, p, flags);
|
||||||
if (add_pat == -1) {
|
if (add_pat == -1) {
|
||||||
retval = FAIL;
|
recursive = false;
|
||||||
|
FreeWild(ga.ga_len, (char_u **)ga.ga_data);
|
||||||
|
*num_file = 0;
|
||||||
|
*file = NULL;
|
||||||
|
return FAIL;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// First expand environment variables, "~/" and "~user/".
|
// First expand environment variables, "~/" and "~user/".
|
||||||
@@ -1237,7 +1240,7 @@ int gen_expand_wildcards(int num_pat, char_u **pat, int *num_file,
|
|||||||
|
|
||||||
recursive = false;
|
recursive = false;
|
||||||
|
|
||||||
return (ga.ga_data != NULL) ? retval : FAIL;
|
return (ga.ga_data != NULL) ? OK : FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user