summaryrefslogtreecommitdiff
path: root/src/pkg/syscall/syscall_linux.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/syscall/syscall_linux.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/syscall/syscall_linux.go')
-rw-r--r--src/pkg/syscall/syscall_linux.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pkg/syscall/syscall_linux.go b/src/pkg/syscall/syscall_linux.go
index c0f580c7b..bf124bd13 100644
--- a/src/pkg/syscall/syscall_linux.go
+++ b/src/pkg/syscall/syscall_linux.go
@@ -68,7 +68,7 @@ const ImplementsGetwd = true
//sys Getcwd(buf []byte) (n int, errno int)
func Getwd() (wd string, errno int) {
var buf [PathMax]byte
- n, err := Getcwd(&buf)
+ n, err := Getcwd(buf[0:])
if err != 0 {
return "", err
}
@@ -442,7 +442,7 @@ func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, errno in
if errno != 0 {
return n, errno
}
- copied := copy(out, &buf)
+ copied := copy(out, buf[0:])
n += copied
out = out[copied:]
}
@@ -497,7 +497,7 @@ func ptracePoke(pokeReq int, peekReq int, pid int, addr uintptr, data []byte) (c
if errno != 0 {
return n, errno
}
- copy(&buf, data)
+ copy(buf[0:], data)
word := *((*uintptr)(unsafe.Pointer(&buf[0])))
errno = ptrace(pokeReq, pid, addr+uintptr(n), word)
if errno != 0 {