summaryrefslogtreecommitdiff
path: root/src/pkg/encoding/ascii85/ascii85.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-05-27 14:51:47 -0700
committerRuss Cox <rsc@golang.org>2010-05-27 14:51:47 -0700
commit72aaa4ca27df8cf19707c1b5b4795be22dbe2260 (patch)
tree0a1979ffe528bfde23ecdc7ef0339d7d0a7d1a80 /src/pkg/encoding/ascii85/ascii85.go
parent9ead4aa791e9113b87c9ddbde498290d1e5e4b22 (diff)
downloadgolang-72aaa4ca27df8cf19707c1b5b4795be22dbe2260.tar.gz
changes &x -> x[0:] for array to slice conversion
R=gri CC=golang-dev http://codereview.appspot.com/1326042
Diffstat (limited to 'src/pkg/encoding/ascii85/ascii85.go')
-rw-r--r--src/pkg/encoding/ascii85/ascii85.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pkg/encoding/ascii85/ascii85.go b/src/pkg/encoding/ascii85/ascii85.go
index 67d6ef7ed..ead0c2475 100644
--- a/src/pkg/encoding/ascii85/ascii85.go
+++ b/src/pkg/encoding/ascii85/ascii85.go
@@ -117,7 +117,7 @@ func (e *encoder) Write(p []byte) (n int, err os.Error) {
if e.nbuf < 4 {
return
}
- nout := Encode(&e.out, &e.buf)
+ nout := Encode(e.out[0:], e.buf[0:])
if _, e.err = e.w.Write(e.out[0:nout]); e.err != nil {
return n, e.err
}
@@ -132,7 +132,7 @@ func (e *encoder) Write(p []byte) (n int, err os.Error) {
}
nn -= nn % 4
if nn > 0 {
- nout := Encode(&e.out, p[0:nn])
+ nout := Encode(e.out[0:], p[0:nn])
if _, e.err = e.w.Write(e.out[0:nout]); e.err != nil {
return n, e.err
}
@@ -155,7 +155,7 @@ func (e *encoder) Write(p []byte) (n int, err os.Error) {
func (e *encoder) Close() os.Error {
// If there's anything left in the buffer, flush it out
if e.err == nil && e.nbuf > 0 {
- nout := Encode(&e.out, e.buf[0:e.nbuf])
+ nout := Encode(e.out[0:], e.buf[0:e.nbuf])
e.nbuf = 0
_, e.err = e.w.Write(e.out[0:nout])
}
@@ -275,10 +275,10 @@ func (d *decoder) Read(p []byte) (n int, err os.Error) {
// Decode leftover input from last read.
var nn, nsrc, ndst int
if d.nbuf > 0 {
- ndst, nsrc, d.err = Decode(&d.outbuf, d.buf[0:d.nbuf], d.readErr != nil)
+ ndst, nsrc, d.err = Decode(d.outbuf[0:], d.buf[0:d.nbuf], d.readErr != nil)
if ndst > 0 {
d.out = d.outbuf[0:ndst]
- d.nbuf = copy(&d.buf, d.buf[nsrc:d.nbuf])
+ d.nbuf = copy(d.buf[0:], d.buf[nsrc:d.nbuf])
continue // copy out and return
}
}