diff options
author | Russ Cox <rsc@golang.org> | 2009-04-06 21:14:38 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-04-06 21:14:38 -0700 |
commit | 71a88a79ac75ccaca1986af7d3616563cbb2f74f (patch) | |
tree | 11b2c9abd86388bca4645ea2e395082cb069828b /src/lib/syscall/errstr_linux.go | |
parent | 33580b7ee07748cc7e5a8c0d28ed6e8340a92475 (diff) | |
download | golang-71a88a79ac75ccaca1986af7d3616563cbb2f74f.tar.gz |
an early 6g limitation forced the use of
string(b)[0:n]
instead of the more direct string(b[0:n]).
convert to the more direct form.
R=r
DELTA=5 (0 added, 0 deleted, 5 changed)
OCL=27082
CL=27140
Diffstat (limited to 'src/lib/syscall/errstr_linux.go')
-rw-r--r-- | src/lib/syscall/errstr_linux.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/syscall/errstr_linux.go b/src/lib/syscall/errstr_linux.go index 61ac4b56e..47b5c6462 100644 --- a/src/lib/syscall/errstr_linux.go +++ b/src/lib/syscall/errstr_linux.go @@ -281,7 +281,7 @@ func str(val int64) string { // do it here rather than with fmt to avoid depend val /= 10; } buf[i] = byte(val + '0'); - return string(buf)[i:len(buf)]; + return string(buf[i:len(buf)]); } func Errstr(errno int64) string { |