Software /
code /
prosody
Diff
util/ip.lua @ 7481:b3a864df32ef
util.ip: remove unused one-letter loop variables [luacheck]
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sat, 09 Jul 2016 10:27:57 +0800 |
parent | 7061:eda0feeaf759 |
child | 7486:c415a3fd4485 |
line wrap: on
line diff
--- a/util/ip.lua Sat Jul 09 10:26:18 2016 +0800 +++ b/util/ip.lua Sat Jul 09 10:27:57 2016 +0800 @@ -51,11 +51,11 @@ if not ip:match(":$") then fields[#fields] = nil; end for i, field in ipairs(fields) do if field:len() == 0 and i ~= 1 and i ~= #fields then - for i = 1, 16 * (9 - #fields) do + for _ = 1, 16 * (9 - #fields) do result = result .. "0"; end else - for i = 1, 4 - field:len() do + for _ = 1, 4 - field:len() do result = result .. "0000"; end for i = 1, field:len() do