p2p/netutil: fix staticcheck warning

This commit is contained in:
Felix Lange 2019-11-18 16:42:40 +01:00
parent 57d697629d
commit fce84fb793

View file

@ -212,7 +212,7 @@ func sameNet(bits uint, ip, other net.IP) bool {
if mask != 0 && nb < len(ip) && ip[nb]&mask != other[nb]&mask {
return false
}
return nb <= len(ip) && bytes.Equal(ip[:nb], other[:nb])
return nb <= len(ip) && ip[:nb].Equal(other[:nb])
}
// DistinctNetSet tracks IPs, ensuring that at most N of them