aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2018-04-17 01:11:05 +0300
committerZyX <kp-pav@yandex.ru>2018-04-17 01:36:18 +0300
commiteba61fbc974da88ae43f0fc5936708ecdf91e7fa (patch)
tree792cc94e4ffaa1d694ee388d087be7730cd4b886
parent4a1251206a7016d37a853b0c48e2b4901ef363b3 (diff)
downloadrneovim-eba61fbc974da88ae43f0fc5936708ecdf91e7fa.tar.gz
rneovim-eba61fbc974da88ae43f0fc5936708ecdf91e7fa.tar.bz2
rneovim-eba61fbc974da88ae43f0fc5936708ecdf91e7fa.zip
path: Silence PVS/V557: impossible to reach with NUL-terminated string
-rw-r--r--src/nvim/path.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c
index e3d87ff33e..4f3f7c0661 100644
--- a/src/nvim/path.c
+++ b/src/nvim/path.c
@@ -677,7 +677,8 @@ static size_t do_path_expand(garray_T *gap, const char_u *path,
if ((name[0] != '.'
|| starts_with_dot
|| ((flags & EW_DODOT)
- && name[1] != NUL && (name[1] != '.' || name[2] != NUL)))
+ && name[1] != NUL
+ && (name[1] != '.' || name[2] != NUL))) // -V557
&& ((regmatch.regprog != NULL && vim_regexec(&regmatch, name, 0))
|| ((flags & EW_NOTWILD)
&& fnamencmp(path + (s - buf), name, e - s) == 0))) {