]> Cypherpunks repositories - gostls13.git/commitdiff
Return ptrace event message when there's no error instead of
authorAustin Clements <aclements@csail.mit.edu>
Wed, 15 Jul 2009 01:05:29 +0000 (18:05 -0700)
committerAustin Clements <aclements@csail.mit.edu>
Wed, 15 Jul 2009 01:05:29 +0000 (18:05 -0700)
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

index 70b34b46dc9c793ebf441ff122c37dcdde37f602..ac77942a324cdbe7389b9e73a285c17971028ed0 100644 (file)
@@ -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;
 }