summaryrefslogtreecommitdiff
path: root/src/pkg/net/fd_darwin.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-05-27 14:51:47 -0700
committerRuss Cox <rsc@golang.org>2010-05-27 14:51:47 -0700
commit72aaa4ca27df8cf19707c1b5b4795be22dbe2260 (patch)
tree0a1979ffe528bfde23ecdc7ef0339d7d0a7d1a80 /src/pkg/net/fd_darwin.go
parent9ead4aa791e9113b87c9ddbde498290d1e5e4b22 (diff)
downloadgolang-72aaa4ca27df8cf19707c1b5b4795be22dbe2260.tar.gz
changes &x -> x[0:] for array to slice conversion
R=gri CC=golang-dev http://codereview.appspot.com/1326042
Diffstat (limited to 'src/pkg/net/fd_darwin.go')
-rw-r--r--src/pkg/net/fd_darwin.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pkg/net/fd_darwin.go b/src/pkg/net/fd_darwin.go
index a33504f6e..cd0738753 100644
--- a/src/pkg/net/fd_darwin.go
+++ b/src/pkg/net/fd_darwin.go
@@ -46,7 +46,7 @@ func (p *pollster) AddFD(fd int, mode int, repeat bool) os.Error {
}
syscall.SetKevent(ev, fd, kmode, flags)
- n, e := syscall.Kevent(p.kq, &events, &events, nil)
+ n, e := syscall.Kevent(p.kq, events[0:], events[0:], nil)
if e != 0 {
return os.NewSyscallError("kevent", e)
}
@@ -72,7 +72,7 @@ func (p *pollster) DelFD(fd int, mode int) {
// EV_RECEIPT - generate fake EV_ERROR as result of add,
// rather than waiting for real event
syscall.SetKevent(ev, fd, kmode, syscall.EV_DELETE|syscall.EV_RECEIPT)
- syscall.Kevent(p.kq, &events, &events, nil)
+ syscall.Kevent(p.kq, events[0:], events[0:], nil)
}
func (p *pollster) WaitFD(nsec int64) (fd int, mode int, err os.Error) {
@@ -84,7 +84,7 @@ func (p *pollster) WaitFD(nsec int64) (fd int, mode int, err os.Error) {
}
*t = syscall.NsecToTimespec(nsec)
}
- nn, e := syscall.Kevent(p.kq, nil, &p.eventbuf, t)
+ nn, e := syscall.Kevent(p.kq, nil, p.eventbuf[0:], t)
if e != 0 {
if e == syscall.EINTR {
continue