From 828334dd95ce8e4bf3662bd5c89d7c417f0741d0 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Fri, 6 Nov 2009 14:24:38 -0800 Subject: - fine-tuning of one-line func heuristic (nodes.go) - enabled for function declarations (not just function literals) - applied gofmt -w $GOROOT/src (look for instance at src/pkg/debug/elf/elf.go) R=r, rsc CC=go-dev http://go/go-review/1026006 --- src/pkg/syscall/syscall_linux.go | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) (limited to 'src/pkg/syscall/syscall_linux.go') diff --git a/src/pkg/syscall/syscall_linux.go b/src/pkg/syscall/syscall_linux.go index 900889df6..e4b82569e 100644 --- a/src/pkg/syscall/syscall_linux.go +++ b/src/pkg/syscall/syscall_linux.go @@ -120,25 +120,15 @@ const ( shift = 8; ) -func (w WaitStatus) Exited() bool { - return w&mask == exited; -} +func (w WaitStatus) Exited() bool { return w&mask == exited } -func (w WaitStatus) Signaled() bool { - return w&mask != stopped && w&mask != exited; -} +func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != exited } -func (w WaitStatus) Stopped() bool { - return w&0xFF == stopped; -} +func (w WaitStatus) Stopped() bool { return w&0xFF == stopped } -func (w WaitStatus) Continued() bool { - return w == 0xFFFF; -} +func (w WaitStatus) Continued() bool { return w == 0xFFFF } -func (w WaitStatus) CoreDump() bool { - return w.Signaled() && w&core != 0; -} +func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 } func (w WaitStatus) ExitStatus() int { if !w.Exited() { @@ -536,17 +526,11 @@ func PtraceCont(pid int, signal int) (errno int) { return ptrace(PTRACE_CONT, pid, 0, uintptr(signal)); } -func PtraceSingleStep(pid int) (errno int) { - return ptrace(PTRACE_SINGLESTEP, pid, 0, 0); -} +func PtraceSingleStep(pid int) (errno int) { return ptrace(PTRACE_SINGLESTEP, pid, 0, 0) } -func PtraceAttach(pid int) (errno int) { - return ptrace(PTRACE_ATTACH, pid, 0, 0); -} +func PtraceAttach(pid int) (errno int) { return ptrace(PTRACE_ATTACH, pid, 0, 0) } -func PtraceDetach(pid int) (errno int) { - return ptrace(PTRACE_DETACH, pid, 0, 0); -} +func PtraceDetach(pid int) (errno int) { return ptrace(PTRACE_DETACH, pid, 0, 0) } // Sendto // Recvfrom -- cgit v1.2.3