forked from TrueCloudLab/frostfs-sdk-go
[#131] pool: Remove redundant var from pool.PutObject
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
eee9a72a4e
commit
d5ce5d63b4
1 changed files with 1 additions and 3 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue