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

Commit

Permalink
netaddr: change uint128.commonPrefixLen receiver name for consistency (
Browse files Browse the repository at this point in the history
…#121)

Signed-off-by: Matt Layher <[email protected]>
  • Loading branch information
mdlayher authored Jan 15, 2021
1 parent 3e46488 commit bffc12a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions uint128.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ func u64CommonPrefixLen(a, b uint64) uint8 {
return uint8(bits.LeadingZeros64(a ^ b))
}

func (a uint128) commonPrefixLen(b uint128) (n uint8) {
if n = u64CommonPrefixLen(a.hi, b.hi); n == 64 {
n += u64CommonPrefixLen(a.lo, b.lo)
func (u uint128) commonPrefixLen(v uint128) (n uint8) {
if n = u64CommonPrefixLen(u.hi, v.hi); n == 64 {
n += u64CommonPrefixLen(u.lo, v.lo)
}
return
}
Expand Down

0 comments on commit bffc12a

Please sign in to comment.