From b6e66639466f5583e6d1f77d5c8112096f923d7f Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Tue, 14 Jul 2009 18:05:29 -0700 Subject: [PATCH] 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 --- src/pkg/syscall/syscall_linux.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; }