Commit fa897643 authored by Michael Munday's avatar Michael Munday

runtime: remove unnecessary calls to memclr

Go will have already cleared the structs (the original C wouldn't
have).

Change-Id: I4a5a0cfd73953181affc158d188aae2ce281bb33
Reviewed-on: https://go-review.googlesource.com/27435
Run-TryBot: Michael Munday <munday@ca.ibm.com>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 8cd04da7
......@@ -388,7 +388,6 @@ func osyield()
//go:nowritebarrierrec
func setsig(i int32, fn uintptr, restart bool) {
var sa sigactiont
memclr(unsafe.Pointer(&sa), unsafe.Sizeof(sa))
sa.sa_flags = _SA_SIGINFO | _SA_ONSTACK | _SA_RESTORER
if restart {
sa.sa_flags |= _SA_RESTART
......@@ -431,8 +430,6 @@ func setsigstack(i int32) {
//go:nowritebarrierrec
func getsig(i int32) uintptr {
var sa sigactiont
memclr(unsafe.Pointer(&sa), unsafe.Sizeof(sa))
if rt_sigaction(uintptr(i), nil, &sa, unsafe.Sizeof(sa.sa_mask)) != 0 {
throw("rt_sigaction read failure")
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment