]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11903: Fix errors reported by PVS-Studio Static Code Analyzer for switch_estimators.c
authorAndrey Volk <andywolk@gmail.com>
Fri, 12 Jul 2019 16:41:35 +0000 (20:41 +0400)
committerAndrey Volk <andywolk@gmail.com>
Mon, 15 Jul 2019 19:41:47 +0000 (23:41 +0400)
src/switch_estimators.c

index 86d7bfd35c96fea2fa97d6086003a7d25a56d8eb..2aedf8cc6e878acb3788c9c2d06770af78e5a1f3 100644 (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;
                }
        }