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

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
remotes/fyrchik/fix-lint
Leonard Lyubich 2022-02-11 08:03:14 +03:00 committed by LeL
parent eee9a72a4e
commit d5ce5d63b4
1 changed files with 1 additions and 3 deletions

View File

@ -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
}