diff options
author | Anton Shestakov <av6@dwimlabs.net> | 2016-07-14 18:43:17 +0800 |
---|---|---|
committer | Anton Shestakov <av6@dwimlabs.net> | 2016-07-14 18:43:17 +0800 |
commit | 848f1bb7d5e2fbeae44001ca7c2d54d56a72d7a0 (patch) | |
tree | b77c143f2724072b4f3db5d6cc77451c8225b862 /net/dns.lua | |
parent | ea1dd1eb0dfdc2bb33e182c3ae955ab1e8bbe3e2 (diff) | |
download | prosody-848f1bb7d5e2fbeae44001ca7c2d54d56a72d7a0.tar.gz prosody-848f1bb7d5e2fbeae44001ca7c2d54d56a72d7a0.zip |
net.dns: remove unused one-letter loop variables [luacheck]
Diffstat (limited to 'net/dns.lua')
-rw-r--r-- | net/dns.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/dns.lua b/net/dns.lua index 726b2b80..7bdb9e57 100644 --- a/net/dns.lua +++ b/net/dns.lua @@ -386,7 +386,7 @@ end function resolver:AAAA(rr) local addr = {}; - for i = 1, rr.rdlength, 2 do + for _ = 1, rr.rdlength, 2 do local b1, b2 = self:byte(2); table.insert(addr, ("%02x%02x"):format(b1, b2)); end @@ -523,7 +523,7 @@ end function resolver:rrs (count) -- - - - - - - - - - - - - - - - - - - - - rrs local rrs = {}; - for i = 1,count do append(rrs, self:rr()); end + for _ = 1, count do append(rrs, self:rr()); end return rrs; end @@ -536,7 +536,7 @@ function resolver:decode(packet, force) -- - - - - - - - - - - - - - decode response.question = {}; local offset = self.offset; - for i = 1,response.header.qdcount do + for _ = 1, response.header.qdcount do append(response.question, self:question()); end response.question.raw = string.sub(self.packet, offset, self.offset - 1); @@ -1026,7 +1026,7 @@ function resolver.print(response) -- - - - - - - - - - - - - resolver.print local tmp; for _, s in pairs({'answer', 'authority', 'additional'}) do for i,rr in pairs(response[s]) do - for j,t in pairs({ 'name', 'type', 'class', 'ttl', 'rdlength' }) do + for _, t in pairs({ 'name', 'type', 'class', 'ttl', 'rdlength' }) do tmp = string.format('%s[%i].%s', s, i, t); print(string.format('%-30s', tmp), rr[t], hint(rr, t)); end |