diff --git a/pkg/registry/core/service/allocator/utils.go b/pkg/registry/core/service/allocator/utils.go index baf64506e09..c034f51e6c9 100644 --- a/pkg/registry/core/service/allocator/utils.go +++ b/pkg/registry/core/service/allocator/utils.go @@ -24,8 +24,8 @@ import ( // countBits returns the number of set bits in n func countBits(n *big.Int) int { var count int = 0 - for _, b := range n.Bytes() { - count += bits.OnesCount8(uint8(b)) + for _, w := range n.Bits() { + count += bits.OnesCount64(uint64(w)) } return count }