mirror of
https://github.com/neovim/neovim.git
synced 2025-10-18 07:41:51 +00:00
fixup! vim-patch:8.2.2136: Vim9: Using uninitialized variable
Resolve pvs/v560 error. mods is nonnull in the modified inner if-condition. because it is checked for NULL in the outer if-condition.
This commit is contained in:
@@ -2547,7 +2547,7 @@ static void f_fnamemodify(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
|||||||
} else {
|
} else {
|
||||||
len = strlen(fname);
|
len = strlen(fname);
|
||||||
size_t usedlen = 0;
|
size_t usedlen = 0;
|
||||||
if (mods != NULL && *mods != NUL) {
|
if (*mods != NUL) {
|
||||||
(void)modify_fname((char_u *)mods, false, &usedlen,
|
(void)modify_fname((char_u *)mods, false, &usedlen,
|
||||||
(char_u **)&fname, &fbuf, &len);
|
(char_u **)&fname, &fbuf, &len);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user