Skip to content

Commit

Permalink
p2p/netutil: fix staticcheck warning (#20315)
Browse files Browse the repository at this point in the history
  • Loading branch information
fjl authored and karalabe committed Nov 19, 2019
1 parent dfe8912 commit 5fefe39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p2p/netutil/net.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5fefe39

Please sign in to comment.