aboutsummaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-05-12 15:51:06 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-05-12 15:51:06 +0100
commitb6cd68eaabf58af11a06ac585188618052549589 (patch)
tree534a80b5c95d7c2f7db9d57738a17ba394a35247 /lualib
parent48a973046150e1d95b028ca6c91da3fc21b09e02 (diff)
downloadrspamd-b6cd68eaabf58af11a06ac585188618052549589.tar.gz
rspamd-b6cd68eaabf58af11a06ac585188618052549589.zip
[Minor] Pet luacheck
Diffstat (limited to 'lualib')
-rw-r--r--lualib/lua_util.lua11
1 files changed, 5 insertions, 6 deletions
diff --git a/lualib/lua_util.lua b/lualib/lua_util.lua
index ec0e8882c..cf4636aa2 100644
--- a/lualib/lua_util.lua
+++ b/lualib/lua_util.lua
@@ -482,7 +482,6 @@ exports.override_defaults = override_defaults
-- their characteristics
--]]
exports.extract_specific_urls = function(task, lim, need_emails, filter, prefix)
- local fun = require "fun"
local cache_key
if prefix then
@@ -559,8 +558,8 @@ exports.extract_specific_urls = function(task, lim, need_emails, filter, prefix)
if neslds <= lim then
-- We can get urls based on their eslds
while lim > 0 do
- for _,urls in pairs(eslds) do
- table.insert(res, table.remove(urls))
+ for _,lurls in pairs(eslds) do
+ table.insert(res, table.remove(lurls))
lim = lim - 1
end
end
@@ -571,8 +570,8 @@ exports.extract_specific_urls = function(task, lim, need_emails, filter, prefix)
if ntlds <= lim then
while lim > 0 do
- for _,urls in pairs(tlds) do
- table.insert(res, table.remove(urls))
+ for _,lurls in pairs(tlds) do
+ table.insert(res, table.remove(lurls))
lim = lim - 1
end
end
@@ -588,7 +587,7 @@ exports.extract_specific_urls = function(task, lim, need_emails, filter, prefix)
return #tlds[t1] < #tlds[t2]
end)
- local ntlds = #tlds_keys
+ ntlds = #tlds_keys
for i=1,ntlds / 2 do
local tld1 = tlds[tlds_keys[i]]
local tld2 = tlds[tlds_keys[ntlds - i]]