From: Dan Kortschak Date: Sun, 16 Oct 2022 09:30:42 +0000 (+1030) Subject: runtime: remove redundant conversion X-Git-Tag: go1.20rc1~625 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=85b02de083b5e337bcb581005d0efca883fdb3d9;p=gostls13.git runtime: remove redundant conversion This appears to have been left over from a C cast during the rewrite of malloc into Go in https://golang.org/cl/108840046. Change-Id: I88f212089c2bcf79d5881b3e8bf3f94f343331d8 Reviewed-on: https://go-review.googlesource.com/c/go/+/443235 Run-TryBot: Dan Kortschak Run-TryBot: Ian Lance Taylor Reviewed-by: Keith Randall Auto-Submit: Ian Lance Taylor TryBot-Result: Gopher Robot Reviewed-by: Ian Lance Taylor --- diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go index 53184615a1..cece04eeca 100644 --- a/src/runtime/malloc.go +++ b/src/runtime/malloc.go @@ -1043,7 +1043,7 @@ func mallocgc(size uintptr, typ *_type, needzero bool) unsafe.Pointer { } x = unsafe.Pointer(v) if needzero && span.needzero != 0 { - memclrNoHeapPointers(unsafe.Pointer(v), size) + memclrNoHeapPointers(x, size) } } } else {