aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/export_test.go2
-rw-r--r--src/runtime/map_test.go2
-rw-r--r--src/runtime/stubs.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/export_test.go b/src/runtime/export_test.go
index e7279564e3..01fd1dbd97 100644
--- a/src/runtime/export_test.go
+++ b/src/runtime/export_test.go
@@ -198,7 +198,7 @@ func MemclrBytes(b []byte) {
memclrNoHeapPointers(s.array, uintptr(s.len))
}
-var HashLoad = &hashLoad
+const HashLoad = hashLoad
// entry point for testing
func GostringW(w []uint16) (s string) {
diff --git a/src/runtime/map_test.go b/src/runtime/map_test.go
index 24556b4093..f78cad5a77 100644
--- a/src/runtime/map_test.go
+++ b/src/runtime/map_test.go
@@ -473,7 +473,7 @@ func TestMapNanGrowIterator(t *testing.T) {
nan := math.NaN()
const nBuckets = 16
// To fill nBuckets buckets takes LOAD * nBuckets keys.
- nKeys := int(nBuckets * *runtime.HashLoad)
+ nKeys := int(nBuckets * runtime.HashLoad)
// Get map to full point with nan keys.
for i := 0; i < nKeys; i++ {
diff --git a/src/runtime/stubs.go b/src/runtime/stubs.go
index 8a520d7839..c85b7d7330 100644
--- a/src/runtime/stubs.go
+++ b/src/runtime/stubs.go
@@ -119,7 +119,7 @@ func reflect_memmove(to, from unsafe.Pointer, n uintptr) {
}
// exported value for testing
-var hashLoad = float32(loadFactorNum) / float32(loadFactorDen)
+const hashLoad = float32(loadFactorNum) / float32(loadFactorDen)
//go:nosplit
func fastrand() uint32 {