From: Austin Clements Date: Wed, 15 Jul 2009 01:05:29 +0000 (-0700) Subject: Return ptrace event message when there's no error instead of X-Git-Tag: weekly.2009-11-06~1141 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b6e66639466f5583e6d1f77d5c8112096f923d7f;p=gostls13.git Return ptrace event message when there's no error instead of only when there's an error. R=rsc APPROVED=rsc DELTA=3 (0 added, 2 deleted, 1 changed) OCL=31650 CL=31650 --- diff --git a/src/pkg/syscall/syscall_linux.go b/src/pkg/syscall/syscall_linux.go index 70b34b46dc..ac77942a32 100644 --- a/src/pkg/syscall/syscall_linux.go +++ b/src/pkg/syscall/syscall_linux.go @@ -521,9 +521,7 @@ func PtraceSetOptions(pid int, options int) (errno int) { func PtraceGetEventMsg(pid int) (msg uint, errno int) { var data _C_long; errno = ptrace(_PTRACE_GETEVENTMSG, pid, 0, uintptr(unsafe.Pointer(&data))); - if errno != 0 { - msg = uint(data); - } + msg = uint(data); return; }