Software /
code /
prosody
Changeset
7480:3dc7de31d3d1
net.dns: don't use "for s,s in pairs..." (unused loop variable s) [luacheck]
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sat, 09 Jul 2016 10:26:18 +0800 |
parents | 7479:a82f88db12f7 |
children | 7481:b3a864df32ef |
files | net/dns.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/net/dns.lua Sat Jul 09 10:17:00 2016 +0800 +++ b/net/dns.lua Sat Jul 09 10:26:18 2016 +0800 @@ -1011,7 +1011,7 @@ 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 @@ 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);