From 9aad19327eb719775a874f8f18bb15958db1d471 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Mon, 9 Nov 2009 21:23:52 -0800 Subject: - replaced gofmt expression formatting algorithm with rsc's algorithm - applied gofmt -w misc src - partial CL (last chunk) R=rsc, r http://go/go-review/1024041 --- src/pkg/net/fd_linux.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/pkg/net/fd_linux.go') diff --git a/src/pkg/net/fd_linux.go b/src/pkg/net/fd_linux.go index ddde33ee4..83d66ac89 100644 --- a/src/pkg/net/fd_linux.go +++ b/src/pkg/net/fd_linux.go @@ -73,7 +73,7 @@ func (p *pollster) StopWaiting(fd int, bits uint) { // If syscall.EPOLLONESHOT is not set, the wait // is a repeating wait, so don't change it. - if events & syscall.EPOLLONESHOT == 0 { + if events&syscall.EPOLLONESHOT == 0 { return } @@ -81,7 +81,7 @@ func (p *pollster) StopWaiting(fd int, bits uint) { // If we're still waiting for other events, modify the fd // event in the kernel. Otherwise, delete it. events &= ^uint32(bits); - if int32(events) & ^syscall.EPOLLONESHOT != 0 { + if int32(events)&^syscall.EPOLLONESHOT != 0 { var ev syscall.EpollEvent; ev.Fd = int32(fd); ev.Events = events; @@ -111,7 +111,7 @@ func (p *pollster) WaitFD(nsec int64) (fd int, mode int, err os.Error) { ev := &evarray[0]; var msec int = -1; if nsec > 0 { - msec = int((nsec+1e6-1)/1e6) + msec = int((nsec + 1e6 - 1) / 1e6) } n, e := syscall.EpollWait(p.epfd, &evarray, msec); for e == syscall.EAGAIN || e == syscall.EINTR { @@ -125,18 +125,18 @@ func (p *pollster) WaitFD(nsec int64) (fd int, mode int, err os.Error) { } fd = int(ev.Fd); - if ev.Events & writeFlags != 0 { + if ev.Events&writeFlags != 0 { p.StopWaiting(fd, writeFlags); return fd, 'w', nil; } - if ev.Events & readFlags != 0 { + if ev.Events&readFlags != 0 { p.StopWaiting(fd, readFlags); return fd, 'r', nil; } // Other events are error conditions - wake whoever is waiting. events, _ := p.events[fd]; - if events & writeFlags != 0 { + if events&writeFlags != 0 { p.StopWaiting(fd, writeFlags); return fd, 'w', nil; } -- cgit v1.2.3