diff options
author | Anton Shestakov <av6@dwimlabs.net> | 2016-07-09 10:26:18 +0800 |
---|---|---|
committer | Anton Shestakov <av6@dwimlabs.net> | 2016-07-09 10:26:18 +0800 |
commit | c227b1834642429fe017504d3937974c4688c73a (patch) | |
tree | 23a580587d09f931308f81eb5d64e1ed3419ba0d /net/dns.lua | |
parent | 5ea57df29b1710a9b30d303264106a9abbcecf71 (diff) | |
download | prosody-c227b1834642429fe017504d3937974c4688c73a.tar.gz prosody-c227b1834642429fe017504d3937974c4688c73a.zip |
net.dns: don't use "for s,s in pairs..." (unused loop variable s) [luacheck]
Diffstat (limited to 'net/dns.lua')
-rw-r--r-- | net/dns.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/dns.lua b/net/dns.lua index 4a35fc1b..726b2b80 100644 --- a/net/dns.lua +++ b/net/dns.lua @@ -1011,7 +1011,7 @@ end function resolver.print(response) -- - - - - - - - - - - - - resolver.print - for s,s in pairs { 'id', 'qr', 'opcode', 'aa', 'tc', 'rd', 'ra', 'z', + for _, s in pairs { 'id', 'qr', 'opcode', 'aa', 'tc', 'rd', 'ra', 'z', 'rcode', 'qdcount', 'ancount', 'nscount', 'arcount' } do print( string.format('%-30s', 'header.'..s), response.header[s], hint(response.header, s) ); end @@ -1024,7 +1024,7 @@ function resolver.print(response) -- - - - - - - - - - - - - resolver.print local common = { name=1, type=1, class=1, ttl=1, rdlength=1, rdata=1 }; local tmp; - for s,s in pairs({'answer', 'authority', 'additional'}) do + 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 tmp = string.format('%s[%i].%s', s, i, t); |