提交 6ee5ad8b authored 作者: Andrey Volk's avatar Andrey Volk

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

上级 42db14e6
...@@ -205,19 +205,19 @@ SWITCH_DECLARE(switch_bool_t) switch_kalman_estimate(kalman_estimator_t * est, f ...@@ -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 */ /*sanitize input a little bit, just in case */
if (system_model == EST_LOSS ) { if (system_model == EST_LOSS ) {
if ((measurement > 100) && (measurement < 0)) { if ((measurement > 100) || (measurement < 0)) {
return SWITCH_FALSE ; return SWITCH_FALSE ;
} }
} }
if (system_model == EST_JITTER) { if (system_model == EST_JITTER) {
if ((measurement > 10000) && (measurement < 0)) { if ((measurement > 10000) || (measurement < 0)) {
return SWITCH_FALSE; return SWITCH_FALSE;
} }
} }
if (system_model == EST_RTT) { if (system_model == EST_RTT) {
if ((measurement > 2 ) && (measurement < 0)) { if ((measurement > 2 ) || (measurement < 0)) {
return SWITCH_FALSE; return SWITCH_FALSE;
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论