From 75a37ba42e079bcd94a211e2551e62e7f3164adf Mon Sep 17 00:00:00 2001 From: Andrey Volk Date: Fri, 12 Jul 2019 20:04:13 +0400 Subject: [PATCH] FS-11903: Fix errors reported by PVS-Studio Static Code Analyzer for mod_expr --- src/mod/applications/mod_expr/exprfunc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod/applications/mod_expr/exprfunc.c b/src/mod/applications/mod_expr/exprfunc.c index bf069c4b9f..1e5f9d82fd 100644 --- a/src/mod/applications/mod_expr/exprfunc.c +++ b/src/mod/applications/mod_expr/exprfunc.c @@ -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; } }