linter changes

This commit is contained in:
ston1th 2021-11-07 10:52:48 +01:00
commit 5c0ec25695

View file

@ -47,15 +47,15 @@ func (a *GenericAlloc) Alloc() (ip *net.IPAddr, err error) {
pos := c.Next()
last := c.Last()
for ; pos != nil && pos != last; pos = c.Next() {
net := &net.IPAddr{IP: pos.IP}
cidr := a.CIDR(net)
n := &net.IPAddr{IP: pos.IP}
cidr := a.CIDR(n)
ok, e := a.store.Exists(cidr)
if e != nil {
return nil, e
}
if !ok {
a.store.Add(cidr)
ip = net
ip = n
return
}
}