summaryrefslogtreecommitdiff
path: root/src/pkg/encoding/git85/git.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/git85/git.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/git85/git.go')
-rw-r--r--src/pkg/encoding/git85/git.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pkg/encoding/git85/git.go b/src/pkg/encoding/git85/git.go
index 25a3deac0..09a45cd3c 100644
--- a/src/pkg/encoding/git85/git.go
+++ b/src/pkg/encoding/git85/git.go
@@ -177,7 +177,7 @@ func (e *encoder) Write(p []byte) (n int, err os.Error) {
if e.nbuf < 52 {
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
}
@@ -191,7 +191,7 @@ func (e *encoder) Write(p []byte) (n int, err os.Error) {
nn = len(p) / 52 * 52
}
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
}
@@ -212,7 +212,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])
}
@@ -265,12 +265,12 @@ func (d *decoder) Read(p []byte) (n int, err os.Error) {
if nl < 0 {
continue
}
- nn, d.err = Decode(&d.outbuf, d.buf[0:nl+1])
+ nn, d.err = Decode(d.outbuf[0:], d.buf[0:nl+1])
if e, ok := d.err.(CorruptInputError); ok {
d.err = CorruptInputError(int64(e) + d.off)
}
d.out = d.outbuf[0:nn]
- d.nbuf = copy(&d.buf, d.buf[nl+1:d.nbuf])
+ d.nbuf = copy(d.buf[0:], d.buf[nl+1:d.nbuf])
d.off += int64(nl + 1)
}
panic("unreacahable")