From 9f3c9209d0eae5d53a8ce895de14ba4dda03c51d Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Thu, 17 Nov 2016 21:04:39 +0000 Subject: [PATCH] s/bCap/bLen/ Signed-off-by: Tom Wilkie (cherry picked from commit 3a0554585177a55802377423bb4529d305b4566f) Signed-off-by: Victor Vieux --- pkg/ioutils/multireader.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/ioutils/multireader.go b/pkg/ioutils/multireader.go index 0806552838..d7b97486c6 100644 --- a/pkg/ioutils/multireader.go +++ b/pkg/ioutils/multireader.go @@ -155,18 +155,18 @@ func (r *multiReadSeeker) Read(b []byte) (int, error) { r.pos = &pos{0, 0} } - bCap := int64(len(b)) + bLen := int64(len(b)) buf := bytes.NewBuffer(nil) var rdr io.ReadSeeker for _, rdr = range r.readers[r.pos.idx:] { - readBytes, err := io.CopyN(buf, rdr, bCap) + readBytes, err := io.CopyN(buf, rdr, bLen) if err != nil && err != io.EOF { return -1, err } - bCap -= readBytes + bLen -= readBytes - if bCap == 0 { + if bLen == 0 { break } }