Skip to content

Commit

Permalink
p2p/netutil: fix staticcheck warning (ethereum#20315)
Browse files Browse the repository at this point in the history
  • Loading branch information
fjl authored and enriquefynn committed Feb 15, 2021
1 parent dcd334c commit 2ce20e7
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 2ce20e7

Please sign in to comment.