summaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
Diffstat (limited to 'lualib')
-rw-r--r--lualib/lua_redis.lua5
-rw-r--r--lualib/rspamd_config_transform.lua5
2 files changed, 6 insertions, 4 deletions
diff --git a/lualib/lua_redis.lua b/lualib/lua_redis.lua
index eda8dc37f..8dafa023b 100644
--- a/lualib/lua_redis.lua
+++ b/lualib/lua_redis.lua
@@ -103,9 +103,10 @@ local function rspamd_parse_redis_server(module_name, module_opts, no_fallback)
else
opts = module_opts
end
- local ret = false
if opts then
+ local ret
+
if opts.redis then
ret = try_load_redis_servers(opts.redis, result)
@@ -127,6 +128,8 @@ local function rspamd_parse_redis_server(module_name, module_opts, no_fallback)
opts = rspamd_config:get_all_opt('redis')
if opts then
+ local ret
+
if opts[module_name] then
ret = try_load_redis_servers(opts[module_name], result)
if ret then
diff --git a/lualib/rspamd_config_transform.lua b/lualib/rspamd_config_transform.lua
index af3e8180e..c7bf56b90 100644
--- a/lualib/rspamd_config_transform.lua
+++ b/lualib/rspamd_config_transform.lua
@@ -15,7 +15,6 @@ limitations under the License.
]]--
local logger = require "rspamd_logger"
-local fun = require "fun"
local function override_defaults(def, override)
if not override then
@@ -83,9 +82,9 @@ local function metric_pairs(t)
for k,v in pairs(tbl) do
if type(k) ~= 'number' then
-- We can also have implicit arrays here
- local is_implicit = is_implicit(v)
+ local sym_implicit = is_implicit(v)
- if is_implicit then
+ if sym_implicit then
for _,elt in ipairs(v) do
table.insert(keys, {k, elt})
end