Commit f7115327 authored by Rob Pike's avatar Rob Pike

os: simplify WriteString

It was working too hard.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4639081
parent 46e74660
......@@ -187,9 +187,7 @@ func (file *File) WriteString(s string) (ret int, err Error) {
if file == nil {
return 0, EINVAL
}
b := syscall.StringByteSlice(s)
b = b[0 : len(b)-1]
return file.Write(b)
return file.Write([]byte(s))
}
// Mkdir creates a new directory with the specified name and permission bits.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment