From: Rob Pike Date: Tue, 29 Jul 2008 20:16:42 +0000 (-0700) Subject: fix type error caused by recent change X-Git-Tag: weekly.2009-11-06~3407 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f095e263c5fef27b3da6dbfb3c76c3b601f46b9f;p=gostls13.git fix type error caused by recent change R=gri OCL=13545 CL=13545 --- diff --git a/src/syscall/errstr_darwin.go b/src/syscall/errstr_darwin.go index c3ae975234..dd4e48587b 100644 --- a/src/syscall/errstr_darwin.go +++ b/src/syscall/errstr_darwin.go @@ -336,11 +336,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] = val%10 + '0'; + buf[i] = byte(val%10 + '0'); i--; val /= 10; } - buf[i] = val + '0'; + buf[i] = byte(val + '0'); return string(buf)[i:len(buf)]; } diff --git a/src/syscall/errstr_linux.go b/src/syscall/errstr_linux.go index fa42572cf7..021861a243 100644 --- a/src/syscall/errstr_linux.go +++ b/src/syscall/errstr_linux.go @@ -410,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] = val%10 + '0'; + buf[i] = byte(val%10 + '0'); i--; val /= 10; } - buf[i] = val + '0'; + buf[i] = byte(val + '0'); return string(buf)[i:len(buf)]; }