From 4653e9d8abef1988be18dc43955a0d2d134c09c6 Mon Sep 17 00:00:00 2001 From: Anton Shestakov Date: Thu, 28 Jul 2016 16:14:39 +0800 Subject: net.server_select: remove unused import [luacheck] --- net/server_select.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/net/server_select.lua b/net/server_select.lua index ce5cb3de..02839062 100644 --- a/net/server_select.lua +++ b/net/server_select.lua @@ -31,7 +31,6 @@ local tostring = use "tostring" --// lua libs //-- -local os = use "os" local table = use "table" local string = use "string" local coroutine = use "coroutine" -- cgit v1.2.3 From 5543c03c4b916a10a0223804208e0883bef3a6cf Mon Sep 17 00:00:00 2001 From: Anton Shestakov Date: Thu, 28 Jul 2016 15:39:48 +0800 Subject: net.dns: remove unused variable unpack [luacheck] --- net/dns.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/dns.lua b/net/dns.lua index 7bdb9e57..232e9e7c 100644 --- a/net/dns.lua +++ b/net/dns.lua @@ -22,8 +22,8 @@ local is_windows = (_ and windows) or os.getenv("WINDIR"); local coroutine, io, math, string, table = coroutine, io, math, string, table; -local ipairs, next, pairs, print, setmetatable, tostring, assert, error, select, type, unpack= - ipairs, next, pairs, print, setmetatable, tostring, assert, error, select, type, table.unpack or unpack; +local ipairs, next, pairs, print, setmetatable, tostring, assert, error, select, type = + ipairs, next, pairs, print, setmetatable, tostring, assert, error, select, type; local ztact = { -- public domain 20080404 lua@ztact.com get = function(parent, ...) -- cgit v1.2.3 From ed9fdb01d11ef19543dfceb19afd249c09ec28cf Mon Sep 17 00:00:00 2001 From: Anton Shestakov Date: Thu, 28 Jul 2016 15:42:24 +0800 Subject: prosodyctl: remove unused variables [luacheck] --- prosodyctl | 3 --- 1 file changed, 3 deletions(-) diff --git a/prosodyctl b/prosodyctl index 34a67e68..adeb9e01 100755 --- a/prosodyctl +++ b/prosodyctl @@ -268,7 +268,6 @@ end local show_message, show_warning = prosodyctl.show_message, prosodyctl.show_warning; local show_usage = prosodyctl.show_usage; -local getchar, getpass = prosodyctl.getchar, prosodyctl.getpass; local show_yesno = prosodyctl.show_yesno; local show_prompt = prosodyctl.show_prompt; local read_password = prosodyctl.read_password; @@ -547,7 +546,6 @@ function commands.about(arg) print("Source directory: "..relpath(pwd, CFG_SOURCEDIR or ".")); print("Plugin directories:") print(" "..(prosody.paths.plugins:gsub("([^;]+);?", function(path) - local opath = path; path = config.resolve_relative_path(pwd, path); local hgid, hgrepo = hg.check_id(path); if not hgid and hgrepo then @@ -804,7 +802,6 @@ function cert_commands.generate(arg) end local _, key_filename = cert_commands.key({arg[1]}); local _, conf_filename = cert_commands.config(arg); - local ret; if key_filename and conf_filename and cert_filename and openssl.req{new=true, x509=true, nodes=true, key=key_filename, days=365, sha256=true, utf8=true, config=conf_filename, out=cert_filename} then -- cgit v1.2.3 From 81e867eb41ec5131cd0725a17f2b4faa8dfe33b2 Mon Sep 17 00:00:00 2001 From: Anton Shestakov Date: Thu, 28 Jul 2016 15:34:45 +0800 Subject: util.openssl: rename variable to not collide with other 'k's [luacheck] --- util/openssl.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util/openssl.lua b/util/openssl.lua index abd90a84..703c6d15 100644 --- a/util/openssl.lua +++ b/util/openssl.lua @@ -61,15 +61,15 @@ local DN_order = { _M._DN_order = DN_order; function ssl_config:serialize() local s = ""; - for k, t in pairs(self) do - s = s .. ("[%s]\n"):format(k); - if k == "subject_alternative_name" then + for section, t in pairs(self) do + s = s .. ("[%s]\n"):format(section); + if section == "subject_alternative_name" then for san, n in pairs(t) do for i = 1, #n do s = s .. s_format("%s.%d = %s\n", san, i -1, n[i]); end end - elseif k == "distinguished_name" then + elseif section == "distinguished_name" then for _, k in ipairs(t[1] and t or DN_order) do local v = t[k]; if v then -- cgit v1.2.3