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

index bf069c4b9f51d24451c3b4c6a294c3ee53a6f017..1e5f9d82fd83410b2ed91e697dde185af1e76d9c 100644 (file)
@@ -73,7 +73,7 @@ int exprFuncListAdd(exprFuncList * flist, char *name, exprFuncType ptr, int min,
        if (refmin >= 0 && refmax >= 0) {
                if (refmin > refmax) {
                        result = refmin;
-                       refmin = max;
+                       refmin = refmax;
                        refmax = result;
                }
        }
@@ -148,7 +148,7 @@ int exprFuncListAddType(exprFuncList * flist, char *name, int type, int min, int
        if (refmin >= 0 && refmax >= 0) {
                if (refmin > refmax) {
                        result = refmin;
-                       refmin = max;
+                       refmin = refmax;
                        refmax = result;
                }
        }