Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

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 elizabethengelman committed Dec 30, 2019
1 parent db93da5 commit 756ed51
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 756ed51

Please sign in to comment.