FS-11903: Fix errors reported by PVS-Studio Static Code Analyzer for switch_estimators.c

This commit is contained in:
Andrey Volk 2019-07-12 20:41:35 +04:00
parent 42db14e68f
commit 6ee5ad8b83
1 changed files with 3 additions and 3 deletions

View File

@ -205,19 +205,19 @@ SWITCH_DECLARE(switch_bool_t) switch_kalman_estimate(kalman_estimator_t * est, f
/*sanitize input a little bit, just in case */
if (system_model == EST_LOSS ) {
if ((measurement > 100) && (measurement < 0)) {
if ((measurement > 100) || (measurement < 0)) {
return SWITCH_FALSE ;
}
}
if (system_model == EST_JITTER) {
if ((measurement > 10000) && (measurement < 0)) {
if ((measurement > 10000) || (measurement < 0)) {
return SWITCH_FALSE;
}
}
if (system_model == EST_RTT) {
if ((measurement > 2 ) && (measurement < 0)) {
if ((measurement > 2 ) || (measurement < 0)) {
return SWITCH_FALSE;
}
}