diff options
author | Rob Pike <r@golang.org> | 2008-07-28 13:07:58 -0700 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2008-07-28 13:07:58 -0700 |
commit | 89e2887c70675c08a4b250f7cd67d0f1bf0018df (patch) | |
tree | 63a17b618c3e35063bcd97912fac5f807ad2f4bd /src/syscall/errstr_linux.go | |
parent | 5b994164944ebf08a35d290187275d1d2b58c326 (diff) | |
download | golang-89e2887c70675c08a4b250f7cd67d0f1bf0018df.tar.gz |
add lstat
clean up some code
fix comments
add paramter names to interface
R=ken
OCL=13521
CL=13521
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)]; } |