From: Andrey Volk Date: Fri, 12 Jul 2019 16:41:35 +0000 (+0400) Subject: FS-11903: Fix errors reported by PVS-Studio Static Code Analyzer for switch_estimators.c X-Git-Tag: v1.10.0~251 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ee5ad8b83de8e493296de75401085834ccda716;p=thirdparty%2Ffreeswitch.git FS-11903: Fix errors reported by PVS-Studio Static Code Analyzer for switch_estimators.c --- diff --git a/src/switch_estimators.c b/src/switch_estimators.c index 86d7bfd35c..2aedf8cc6e 100644 --- a/src/switch_estimators.c +++ b/src/switch_estimators.c @@ -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; } }