diff options
author | Ihor Antonov <ngortheone@users.noreply.github.com> | 2019-07-27 21:17:57 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-07-28 10:59:44 +0200 |
commit | ce59a70f5b02bb4e3417f5e55e2e77eeeb0c5a9d (patch) | |
tree | 42269b2d039a29156bf8407907b841eb3a968223 /src | |
parent | 5b47ee5b7a48445f0a12a4e5316d44ec70e64d7f (diff) | |
download | rneovim-ce59a70f5b02bb4e3417f5e55e2e77eeeb0c5a9d.tar.gz rneovim-ce59a70f5b02bb4e3417f5e55e2e77eeeb0c5a9d.tar.bz2 rneovim-ce59a70f5b02bb4e3417f5e55e2e77eeeb0c5a9d.zip |
PVS/V560: condition is always true #10624
* before changed line status variable is set to RA_FAIL in 2 places
line 3816 and 3826, both lead to short-circuit of the loop, making
comparing it to RA_FAIL useless
close #10624
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/regexp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c index 414472a8f3..06b99d0b75 100644 --- a/src/nvim/regexp.c +++ b/src/nvim/regexp.c @@ -4323,8 +4323,10 @@ static int regmatch( /* Still at same position as last time, fail. */ status = RA_NOMATCH; - if (status != RA_FAIL && status != RA_NOMATCH) + assert(status != RA_FAIL); + if (status != RA_NOMATCH) { reg_save(&bp[i].bp_pos, &backpos); + } } break; |