diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2019-12-24 21:13:25 +0200 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2020-01-17 18:26:04 +0200 |
commit | ead91fd9bde8524c57ef957e796c5375b8045b58 (patch) | |
tree | 278e1dd134a8719196030484222d70cab7354555 | |
parent | 6a1dd8fc5bed009657182aac3854c15c4f8c78f8 (diff) | |
download | awall-ead91fd9bde8524c57ef957e796c5375b8045b58.tar.bz2 awall-ead91fd9bde8524c57ef957e796c5375b8045b58.tar.xz |
init: use _ for unused index variable
-rwxr-xr-x | awall-cli | 4 | ||||
-rw-r--r-- | awall/init.lua | 12 |
2 files changed, 8 insertions, 8 deletions
@@ -2,7 +2,7 @@ --[[ Alpine Wall -Copyright (C) 2012-2019 Kaarle Ritvanen +Copyright (C) 2012-2020 Kaarle Ritvanen See LICENSE file for license details ]]-- @@ -21,7 +21,7 @@ if not table.unpack then table.unpack = unpack end function help() io.stderr:write([[ Alpine Wall -Copyright (C) 2012-2019 Kaarle Ritvanen +Copyright (C) 2012-2020 Kaarle Ritvanen This is free software with ABSOLUTELY NO WARRANTY, available under the terms of the GNU General Public License, version 2 diff --git a/awall/init.lua b/awall/init.lua index 623df44..804bdd7 100644 --- a/awall/init.lua +++ b/awall/init.lua @@ -1,6 +1,6 @@ --[[ Alpine Wall main module -Copyright (C) 2012-2019 Kaarle Ritvanen +Copyright (C) 2012-2020 Kaarle Ritvanen See LICENSE file for license details ]]-- @@ -60,7 +60,7 @@ function M.loadmodules(path) table.sort(modules) local imported = {} - for i, name in ipairs(modules) do + for _, name in ipairs(modules) do extend(imported, readmetadata(require(name))) end @@ -86,7 +86,7 @@ function M.Config:init(policyconfig) local actions = {} local function insertrules(trules, obj) - for i, trule in ipairs(trules) do + for _, trule in ipairs(trules) do local t = self.iptables.config[trule.family][trule.table][trule.chain] local opts = optfrag.command(trule) @@ -118,7 +118,7 @@ function M.Config:init(policyconfig) end end - for i, path in ipairs(procorder) do + for _, path in ipairs(procorder) do if path:sub(1, 1) ~= '%' then local objs = self.objects[path] if objs then @@ -133,7 +133,7 @@ function M.Config:init(policyconfig) end end - for i, event in ipairs(procorder) do + for _, event in ipairs(procorder) do if event:sub(1, 1) == '%' then local r = events[event].rules if r then @@ -144,7 +144,7 @@ function M.Config:init(policyconfig) end end elseif self.objects[event] then - for i, rule in ipairs(self.objects[event]) do + for _, rule in ipairs(self.objects[event]) do insertrules(rule:trules(), rule) end end |