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:
Jan Edmund Lazo
2021-06-05 12:03:40 -04:00
parent 44b6a7b5bf
commit 607d1cc80d

View File

@@ -2547,7 +2547,7 @@ static void f_fnamemodify(typval_T *argvars, typval_T *rettv, FunPtr fptr)
} else {
len = strlen(fname);
size_t usedlen = 0;
if (mods != NULL && *mods != NUL) {
if (*mods != NUL) {
(void)modify_fname((char_u *)mods, false, &usedlen,
(char_u **)&fname, &fbuf, &len);
}