aboutsummaryrefslogtreecommitdiff
path: root/src/math
diff options
context:
space:
mode:
authoryangwenmai <yangwen.yw@gmail.com>2021-04-27 08:30:25 +0800
committerKeith Randall <khr@golang.org>2021-04-27 16:25:40 +0000
commitd553c0144d2a532b3e962715899d6cd9db47192a (patch)
tree012566542c36f93d67662da52a670c15feee4572 /src/math
parentbc6288794de10fddea0a3c3cfcb1cfd2bf2aa8a0 (diff)
downloadgo-d553c0144d2a532b3e962715899d6cd9db47192a.tar.gz
go-d553c0144d2a532b3e962715899d6cd9db47192a.zip
bits: use same expression with system bit size
Change-Id: Ibce07f8f36f7c64f7022ce656f8efbec5dff3f82 Reviewed-on: https://go-review.googlesource.com/c/go/+/313829 Reviewed-by: Robert Griesemer <gri@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'src/math')
-rw-r--r--src/math/bits/bits.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/math/bits/bits.go b/src/math/bits/bits.go
index 879ef2da54..65452feda2 100644
--- a/src/math/bits/bits.go
+++ b/src/math/bits/bits.go
@@ -8,7 +8,7 @@
// functions for the predeclared unsigned integer types.
package bits
-const uintSize = 32 << (^uint(0) >> 32 & 1) // 32 or 64
+const uintSize = 32 << (^uint(0) >> 63) // 32 or 64
// UintSize is the size of a uint in bits.
const UintSize = uintSize