summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/syscall/errstr_darwin.go4
-rw-r--r--src/syscall/errstr_linux.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/syscall/errstr_darwin.go b/src/syscall/errstr_darwin.go
index c3ae97523..dd4e48587 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 fa42572cf..021861a24 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)];
}