]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove runtime.Add testing function
authorAustin Clements <austin@google.com>
Tue, 27 Jun 2023 02:34:05 +0000 (22:34 -0400)
committerGopher Robot <gobot@golang.org>
Mon, 21 Aug 2023 20:20:01 +0000 (20:20 +0000)
Replace with unsafe.Add.

Change-Id: Ic5c155349dadc51457119b3c05ab717cdfd26c95
Reviewed-on: https://go-review.googlesource.com/c/go/+/521176
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Austin Clements <austin@google.com>
Auto-Submit: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/runtime/export_linux_test.go
src/runtime/runtime_linux_test.go

index 426fd1e109325112b4ffcc29f478d34702bc12c1..52afd28666e9af6c7d50a97aa7880bfea3a685bf 100644 (file)
@@ -11,7 +11,6 @@ const SigeventMaxSize = _sigev_max_size
 
 var NewOSProc0 = newosproc0
 var Mincore = mincore
-var Add = add
 
 type Siginfo siginfo
 type Sigevent sigevent
index 6af5561e910d520492829413197f95a7d7063d9a..ab2452c9e72910948ccb4e713deaa925cdbdbfad 100644 (file)
@@ -45,7 +45,7 @@ func TestLockOSThread(t *testing.T) {
 // Use a misaligned pointer to get -EINVAL.
 func TestMincoreErrorSign(t *testing.T) {
        var dst byte
-       v := Mincore(Add(unsafe.Pointer(new(int32)), 1), 1, &dst)
+       v := Mincore(unsafe.Add(unsafe.Pointer(new(int32)), 1), 1, &dst)
 
        const EINVAL = 0x16
        if v != -EINVAL {