mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
pvs/V560: part of conditional expression is always true (#10629)
Since timed_out is pointer to int condition timed_out != NULL && timed_out makes no sense as both are effectively the same thing. Most likely the first check was meant to guard the dereference of the second. Wrong import of Vim patch (8.0.0643).
This commit is contained in:
parent
7f5a113f65
commit
5b47ee5b7a
@ -864,13 +864,11 @@ int searchit(
|
|||||||
}
|
}
|
||||||
at_first_line = FALSE;
|
at_first_line = FALSE;
|
||||||
|
|
||||||
/*
|
// Stop the search if wrapscan isn't set, "stop_lnum" is
|
||||||
* Stop the search if wrapscan isn't set, "stop_lnum" is
|
// specified, after an interrupt, after a match and after looping
|
||||||
* specified, after an interrupt, after a match and after looping
|
// twice.
|
||||||
* twice.
|
|
||||||
*/
|
|
||||||
if (!p_ws || stop_lnum != 0 || got_int || called_emsg
|
if (!p_ws || stop_lnum != 0 || got_int || called_emsg
|
||||||
|| (timed_out != NULL && timed_out)
|
|| (timed_out != NULL && *timed_out)
|
||||||
|| break_loop
|
|| break_loop
|
||||||
|| found || loop) {
|
|| found || loop) {
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user