diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pkg/crypto/cipher/io.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/pkg/crypto/cipher/io.go b/src/pkg/crypto/cipher/io.go index 76048fbf3..807e8daea 100644 --- a/src/pkg/crypto/cipher/io.go +++ b/src/pkg/crypto/cipher/io.go @@ -28,13 +28,10 @@ func (r StreamReader) Read(dst []byte) (n int, err error) { type StreamWriter struct { S Stream W io.Writer - Err error + Err error // unused } func (w StreamWriter) Write(src []byte) (n int, err error) { - if w.Err != nil { - return 0, w.Err - } c := make([]byte, len(src)) w.S.XORKeyStream(c, src) n, err = w.W.Write(c) @@ -42,7 +39,6 @@ func (w StreamWriter) Write(src []byte) (n int, err error) { if err == nil { // should never happen err = io.ErrShortWrite } - w.Err = err } return } |