Skip to content

Commit

Permalink
take it up with the stdlib you ^%@%@ linter
Browse files Browse the repository at this point in the history
  • Loading branch information
jrick committed Jun 11, 2024
1 parent 4c133d5 commit 6d884ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion peer/internal/uniform/rand.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func Uint32n(rand io.Reader, n uint32) uint32 {
hi, lo1b := bits.Mul32(uint32(x>>32), n)
lo1, c := bits.Add32(lo1a, lo1b, 0)
hi += c
if lo1 == 0 && lo0 < uint32(n) {
if lo1 == 0 && lo0 < uint32(n) { //nolint: unconvert
n64 := uint64(n)
thresh := uint32(-n64 % n64)
for lo1 == 0 && lo0 < thresh {
Expand Down

0 comments on commit 6d884ae

Please sign in to comment.