aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/mstats.go
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2017-10-25 11:28:56 +0200
committerTobias Klauser <tobias.klauser@gmail.com>2017-10-25 14:22:53 +0000
commit0c68b79e9ce91ea471b2c1dcfa9da6a375300ad5 (patch)
treedc86150828545df329640fccd7a8cd45a70a7567 /src/runtime/mstats.go
parentbbafa21b37f6e857bfde9e4221a1e2d0fa71e74d (diff)
downloadgo-0c68b79e9ce91ea471b2c1dcfa9da6a375300ad5.tar.gz
go-0c68b79e9ce91ea471b2c1dcfa9da6a375300ad5.zip
runtime/internal/sys: use boolean constants for sys.BigEndian
The BigEndian constant is only used in boolean context so assign it boolean constants. Change-Id: If19d61dd71cdfbffede1d98b401f11e6535fba59 Reviewed-on: https://go-review.googlesource.com/73270 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/mstats.go')
-rw-r--r--src/runtime/mstats.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/mstats.go b/src/runtime/mstats.go
index 18b8401cc4..53caefc0fe 100644
--- a/src/runtime/mstats.go
+++ b/src/runtime/mstats.go
@@ -664,7 +664,7 @@ func purgecachedstats(c *mcache) {
// overflow errors.
//go:nosplit
func mSysStatInc(sysStat *uint64, n uintptr) {
- if sys.BigEndian != 0 {
+ if sys.BigEndian {
atomic.Xadd64(sysStat, int64(n))
return
}
@@ -678,7 +678,7 @@ func mSysStatInc(sysStat *uint64, n uintptr) {
// mSysStatInc apply.
//go:nosplit
func mSysStatDec(sysStat *uint64, n uintptr) {
- if sys.BigEndian != 0 {
+ if sys.BigEndian {
atomic.Xadd64(sysStat, -int64(n))
return
}