path: Silence PVS/V557: impossible to reach with NUL-terminated string

This commit is contained in:
ZyX
2018-04-17 01:11:05 +03:00
parent 4a1251206a
commit eba61fbc97

View File

@@ -677,7 +677,8 @@ static size_t do_path_expand(garray_T *gap, const char_u *path,
if ((name[0] != '.' if ((name[0] != '.'
|| starts_with_dot || starts_with_dot
|| ((flags & EW_DODOT) || ((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)) && ((regmatch.regprog != NULL && vim_regexec(&regmatch, name, 0))
|| ((flags & EW_NOTWILD) || ((flags & EW_NOTWILD)
&& fnamencmp(path + (s - buf), name, e - s) == 0))) { && fnamencmp(path + (s - buf), name, e - s) == 0))) {