Diff

util/ip.lua @ 8382:e5d00bf4a4d5

util: Various minor changes to please [luacheck]
author Kim Alvefur <zash@zash.se>
date Fri, 10 Nov 2017 05:42:32 +0100
parent 7486:c415a3fd4485
child 8428:ca44e462322c
line wrap: on
line diff
--- a/util/ip.lua	Fri Nov 10 05:34:29 2017 +0100
+++ b/util/ip.lua	Fri Nov 10 05:42:32 2017 +0100
@@ -9,7 +9,12 @@
 local ip_mt = { __index = function (ip, key) return (ip_methods[key])(ip); end,
 		__tostring = function (ip) return ip.addr; end,
 		__eq = function (ipA, ipB) return ipA.addr == ipB.addr; end};
-local hex2bits = { ["0"] = "0000", ["1"] = "0001", ["2"] = "0010", ["3"] = "0011", ["4"] = "0100", ["5"] = "0101", ["6"] = "0110", ["7"] = "0111", ["8"] = "1000", ["9"] = "1001", ["A"] = "1010", ["B"] = "1011", ["C"] = "1100", ["D"] = "1101", ["E"] = "1110", ["F"] = "1111" };
+local hex2bits = {
+	["0"] = "0000", ["1"] = "0001", ["2"] = "0010", ["3"] = "0011",
+	["4"] = "0100", ["5"] = "0101", ["6"] = "0110", ["7"] = "0111",
+	["8"] = "1000", ["9"] = "1001", ["A"] = "1010", ["B"] = "1011",
+	["C"] = "1100", ["D"] = "1101", ["E"] = "1110", ["F"] = "1111",
+};
 
 local function new_ip(ipStr, proto)
 	if not proto then