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:
Ihor Antonov 2019-07-27 23:16:14 -04:00 committed by Daniel Hahler
parent 7f5a113f65
commit 5b47ee5b7a

View File

@ -864,13 +864,11 @@ int searchit(
}
at_first_line = FALSE;
/*
* Stop the search if wrapscan isn't set, "stop_lnum" is
* specified, after an interrupt, after a match and after looping
* twice.
*/
// Stop the search if wrapscan isn't set, "stop_lnum" is
// specified, after an interrupt, after a match and after looping
// twice.
if (!p_ws || stop_lnum != 0 || got_int || called_emsg
|| (timed_out != NULL && timed_out)
|| (timed_out != NULL && *timed_out)
|| break_loop
|| found || loop) {
break;