From 85b02de083b5e337bcb581005d0efca883fdb3d9 Mon Sep 17 00:00:00 2001 From: Dan Kortschak Date: Sun, 16 Oct 2022 20:00:42 +1030 Subject: [PATCH] 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 --- src/runtime/malloc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- 2.50.0