aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/os_linux.go
diff options
context:
space:
mode:
authorMichael Munday <munday@ca.ibm.com>2016-08-20 18:36:27 +0100
committerMichael Munday <munday@ca.ibm.com>2016-08-20 18:00:09 +0000
commitfa897643a18d71a62bade50f80171f5e58449f5a (patch)
tree7b590c65528e0365de3ea655472e1990be0de18d /src/runtime/os_linux.go
parent8cd04da7627576197b4fb1ef28985ac9243d13a3 (diff)
downloadgo-fa897643a18d71a62bade50f80171f5e58449f5a.tar.xz
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: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/os_linux.go')
-rw-r--r--src/runtime/os_linux.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/runtime/os_linux.go b/src/runtime/os_linux.go
index 542f214a42..0131c6687d 100644
--- a/src/runtime/os_linux.go
+++ b/src/runtime/os_linux.go
@@ -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")
}