summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/bufio_test.go2
-rw-r--r--src/lib/fmt/format.go2
-rw-r--r--src/lib/syscall/errstr_darwin.go2
-rw-r--r--src/lib/syscall/errstr_linux.go2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/bufio_test.go b/src/lib/bufio_test.go
index 4afad8340..ef97bc46e 100644
--- a/src/lib/bufio_test.go
+++ b/src/lib/bufio_test.go
@@ -135,7 +135,7 @@ func readBytes(buf *BufRead) string {
nb++;
}
// BUG return string(b[0:nb]) ?
- return string(b)[0:nb]
+ return string(b[0:nb])
}
// Call Read to accumulate the text of a file
diff --git a/src/lib/fmt/format.go b/src/lib/fmt/format.go
index 14c5043ac..ce5050371 100644
--- a/src/lib/fmt/format.go
+++ b/src/lib/fmt/format.go
@@ -222,7 +222,7 @@ func (f *Fmt) integer(a int64, base uint, is_signed bool, digits *string) string
buf[i] = ' ';
i--;
}
- return string(buf)[i+1:nByte];
+ return string(buf[i+1:nByte]);
}
// Fmt_d64 formats an int64 in decimal.
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 {