From 4d36ffa8f77914fa4b2e2794607d647d21daec8b Mon Sep 17 00:00:00 2001 From: Ray Jenkins Date: Thu, 18 Feb 2021 13:22:20 -0600 Subject: [PATCH] runtime: remove unnecessary bitwise XOR in noescape This change improves readability by removing an unnecessary bitwise XOR operation in the runtime noescape function. --- src/runtime/stubs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/stubs.go b/src/runtime/stubs.go index c0cc95ec65f..88f820512d7 100644 --- a/src/runtime/stubs.go +++ b/src/runtime/stubs.go @@ -159,7 +159,7 @@ func memequal(a, b unsafe.Pointer, size uintptr) bool //go:nosplit func noescape(p unsafe.Pointer) unsafe.Pointer { x := uintptr(p) - return unsafe.Pointer(x ^ 0) + return unsafe.Pointer(x) } // Not all cgocallback frames are actually cgocallback,