diff options
Diffstat (limited to 'src/syscall/errstr_linux.go')
-rw-r--r-- | src/syscall/errstr_linux.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/syscall/errstr_linux.go b/src/syscall/errstr_linux.go index 875217afc..fa42572cf 100644 --- a/src/syscall/errstr_linux.go +++ b/src/syscall/errstr_linux.go @@ -403,8 +403,6 @@ func init(){ error[EKEYREJECTED] = "Key was rejected by service"; } -var digits string = "0123456789" - func str(val int64) string { // do it here rather than with fmt to avoid dependency if val < 0 { return "-" + str(-val); @@ -412,11 +410,11 @@ func str(val int64) string { // do it here rather than with fmt to avoid depend var buf [32]byte; // big enough for int64 i := len(buf)-1; for val >= 10 { - buf[i] = digits[val%10]; + buf[i] = val%10 + '0'; i--; val /= 10; } - buf[i] = digits[val]; + buf[i] = val + '0'; return string(buf)[i:len(buf)]; } |