Skip to content

Commit 85b02de

Browse files
kortschakgopherbot
authored andcommitted
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 <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Keith Randall <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 61f0409 commit 85b02de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/malloc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ func mallocgc(size uintptr, typ *_type, needzero bool) unsafe.Pointer {
10431043
}
10441044
x = unsafe.Pointer(v)
10451045
if needzero && span.needzero != 0 {
1046-
memclrNoHeapPointers(unsafe.Pointer(v), size)
1046+
memclrNoHeapPointers(x, size)
10471047
}
10481048
}
10491049
} else {

0 commit comments

Comments
 (0)