summaryrefslogtreecommitdiff
path: root/src/pkg/syscall/syscall_linux.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-11-20 11:45:05 -0800
committerRuss Cox <rsc@golang.org>2009-11-20 11:45:05 -0800
commitc861f30835090bbd6b9b35a80667f26952843767 (patch)
tree645bd57ef3c9326ec02e646a751b9075d12a79e7 /src/pkg/syscall/syscall_linux.go
parent7089e97992d5d6be520dfea787200061992526c8 (diff)
downloadgolang-c861f30835090bbd6b9b35a80667f26952843767.tar.gz
gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkg
R=r, gri CC=golang-dev http://codereview.appspot.com/156115
Diffstat (limited to 'src/pkg/syscall/syscall_linux.go')
-rw-r--r--src/pkg/syscall/syscall_linux.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pkg/syscall/syscall_linux.go b/src/pkg/syscall/syscall_linux.go
index 930d99be6..f94dc7df7 100644
--- a/src/pkg/syscall/syscall_linux.go
+++ b/src/pkg/syscall/syscall_linux.go
@@ -416,8 +416,8 @@ func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, errno in
if errno != 0 {
return 0, errno
}
- n += bytesCopy(out, buf[addr%sizeofPtr:len(buf)]);
- out = out[n:len(out)];
+ n += bytesCopy(out, buf[addr%sizeofPtr:]);
+ out = out[n:];
}
// Remainder.
@@ -430,7 +430,7 @@ func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, errno in
}
copied := bytesCopy(out, &buf);
n += copied;
- out = out[copied:len(out)];
+ out = out[copied:];
}
return n, 0;
@@ -456,13 +456,13 @@ func ptracePoke(pokeReq int, peekReq int, pid int, addr uintptr, data []byte) (c
if errno != 0 {
return 0, errno
}
- n += bytesCopy(buf[addr%sizeofPtr:len(buf)], data);
+ n += bytesCopy(buf[addr%sizeofPtr:], data);
word := *((*uintptr)(unsafe.Pointer(&buf[0])));
errno = ptrace(pokeReq, pid, addr-addr%sizeofPtr, word);
if errno != 0 {
return 0, errno
}
- data = data[n:len(data)];
+ data = data[n:];
}
// Interior.
@@ -473,7 +473,7 @@ func ptracePoke(pokeReq int, peekReq int, pid int, addr uintptr, data []byte) (c
return n, errno
}
n += sizeofPtr;
- data = data[sizeofPtr:len(data)];
+ data = data[sizeofPtr:];
}
// Trailing edge.