diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-06-05 12:03:40 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-06-05 12:49:27 -0400 |
commit | 607d1cc80dc8c559684822ba2d35bb71f634aafa (patch) | |
tree | 6deb2888bc0441be31c3c8959ae0b5a7e9c0edfa | |
parent | 44b6a7b5bf55d441aa15f647dac133d159d5dbb4 (diff) | |
download | rneovim-607d1cc80dc8c559684822ba2d35bb71f634aafa.tar.gz rneovim-607d1cc80dc8c559684822ba2d35bb71f634aafa.tar.bz2 rneovim-607d1cc80dc8c559684822ba2d35bb71f634aafa.zip |
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.
-rw-r--r-- | src/nvim/eval/funcs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index caaf675db2..ce09d268ea 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -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); } |