1
0
mirror of https://github.com/golang/go synced 2024-11-21 21:14:47 -07:00

runtime: remove unnecessary bitwise XOR in noescape

This change improves readability by removing an unnecessary bitwise XOR
operation in the runtime noescape function.
This commit is contained in:
Ray Jenkins 2021-02-18 13:22:20 -06:00
parent f3c2208e2c
commit 4d36ffa8f7

View File

@ -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,