[#131] pool: Remove redundant var from pool.PutObject

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-02-11 08:03:14 +03:00 committed by LeL
parent eee9a72a4e
commit d5ce5d63b4

View file

@ -714,13 +714,11 @@ func (p *pool) PutObject(ctx context.Context, hdr object.Object, payload io.Read
buf := make([]byte, sz) buf := make([]byte, sz)
var n int var n int
var ok bool
for { for {
n, err = payload.Read(buf) n, err = payload.Read(buf)
if n > 0 { if n > 0 {
ok = wObj.WritePayloadChunk(buf[:n]) if !wObj.WritePayloadChunk(buf[:n]) {
if !ok {
break break
} }