mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
changes &x -> x[0:] for array to slice conversion
R=gri CC=golang-dev https://golang.org/cl/1326042
This commit is contained in:
parent
7ee6d44e4f
commit
bb84f4b5d2
46 changed files with 95 additions and 95 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue