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
This commit is contained in:
Ihor Antonov 2019-07-27 21:17:57 -04:00 committed by Justin M. Keyes
parent 5b47ee5b7a
commit ce59a70f5b

View File

@ -4323,8 +4323,10 @@ static int regmatch(
/* Still at same position as last time, fail. */ /* Still at same position as last time, fail. */
status = RA_NOMATCH; 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); reg_save(&bp[i].bp_pos, &backpos);
}
} }
break; break;