From d2829faa7c46cd2105eb897e77c92a86baefcd79 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 27 Oct 2009 22:47:54 -0700 Subject: files that are okay from the last gofmt round R=gri http://go/go-review/1015011 --- src/pkg/debug/elf/file.go | 2 +- src/pkg/debug/proc/proc_linux.go | 24 ++++++++---------------- 2 files changed, 9 insertions(+), 17 deletions(-) (limited to 'src/pkg/debug') diff --git a/src/pkg/debug/elf/file.go b/src/pkg/debug/elf/file.go index 0b5ff3fa10..7b1d784548 100644 --- a/src/pkg/debug/elf/file.go +++ b/src/pkg/debug/elf/file.go @@ -174,7 +174,7 @@ func NewFile(r io.ReaderAt) (*File, os.Error) { switch f.Class { case ELFCLASS32: case ELFCLASS64: - // ok + // ok default: return nil, &FormatError{0, "unknown ELF class", f.Class}; } diff --git a/src/pkg/debug/proc/proc_linux.go b/src/pkg/debug/proc/proc_linux.go index f278ec7277..60a0555e98 100644 --- a/src/pkg/debug/proc/proc_linux.go +++ b/src/pkg/debug/proc/proc_linux.go @@ -220,7 +220,7 @@ func (e *newThreadError) String() string { return fmt.Sprintf("newThread wait wanted pid %v and signal %v, got %v and %v", e.Pid, e.StopSignal(), e.wantPid, e.wantSig); } -type ProcessExited struct {} +type ProcessExited struct{} func (p ProcessExited) String() string { return "process exited"; @@ -449,9 +449,9 @@ func (t *thread) wait() { if err == nil { continue; } - // If we failed to continue, just let - // the stop go through so we can - // update the thread's state. + // If we failed to continue, just let + // the stop go through so we can + // update the thread's state. } if !<-t.proc.ready { // The monitor exited @@ -852,12 +852,8 @@ func (t *thread) stepAsync(ready chan os.Error) os.Error { return err; } t.setState(singleStepping); - t.onStop(func() { - ready <- nil; - }, - func(err os.Error) { - ready <- err; - }); + t.onStop(func() { ready <- nil }, + func(err os.Error) { ready <- err }); return nil; } @@ -1100,9 +1096,7 @@ func (p *process) WaitStop() os.Error { } p.transitionHandlers.Push(h); }; - h.onErr = func(err os.Error) { - ready <- err; - }; + h.onErr = func(err os.Error) { ready <- err }; p.transitionHandlers.Push(h); return nil; }); @@ -1114,9 +1108,7 @@ func (p *process) WaitStop() os.Error { } func (p *process) Stop() os.Error { - err := p.do(func() os.Error { - return p.stopAsync(); - }); + err := p.do(func() os.Error { return p.stopAsync() }); if err != nil { return err; } -- cgit v1.3