From d5ce5d63b499e1822bd7ad6cca6b67139a8fb288 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Fri, 11 Feb 2022 08:03:14 +0300 Subject: [PATCH] [#131] pool: Remove redundant var from `pool.PutObject` Signed-off-by: Leonard Lyubich --- pool/pool.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pool/pool.go b/pool/pool.go index 3fe99248..472fe3ec 100644 --- a/pool/pool.go +++ b/pool/pool.go @@ -714,13 +714,11 @@ func (p *pool) PutObject(ctx context.Context, hdr object.Object, payload io.Read buf := make([]byte, sz) var n int - var ok bool for { n, err = payload.Read(buf) if n > 0 { - ok = wObj.WritePayloadChunk(buf[:n]) - if !ok { + if !wObj.WritePayloadChunk(buf[:n]) { break }