1
0
mirror of https://github.com/golang/go synced 2024-11-23 09:00:04 -07:00

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 <dan@kortschak.io>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
Dan Kortschak 2022-10-16 20:00:42 +10:30 committed by Gopher Robot
parent 61f0409c31
commit 85b02de083

View File

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