From 2cdf9d1388ee82dd2d326e45122f47e9d6fbc673 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 22 Apr 2018 19:47:45 +0300 Subject: search: Fix PVS/V560: condition checked in previous if with goto --- src/nvim/search.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/nvim/search.c b/src/nvim/search.c index 3b726b6d08..b252612e5d 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -3396,11 +3396,13 @@ again: goto again; } - if (do_include || r < 1) { - /* Include up to the '>'. */ - while (*get_cursor_pos_ptr() != '>') - if (inc_cursor() < 0) + if (do_include) { + // Include up to the '>'. + while (*get_cursor_pos_ptr() != '>') { + if (inc_cursor() < 0) { break; + } + } } else { char_u *c = get_cursor_pos_ptr(); // Exclude the '<' of the end tag. -- cgit