diff options
Diffstat (limited to 'src/lib/syscall')
-rw-r--r-- | src/lib/syscall/errstr_darwin.go | 2 | ||||
-rw-r--r-- | src/lib/syscall/errstr_linux.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/syscall/errstr_darwin.go b/src/lib/syscall/errstr_darwin.go index 1ea357601..abb79b884 100644 --- a/src/lib/syscall/errstr_darwin.go +++ b/src/lib/syscall/errstr_darwin.go @@ -231,7 +231,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 { 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 { |