forked from TrueCloudLab/frostfs-node
[#1616] getsvc: Move break condition from body to the loop condition
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
b309b34bfc
commit
57dc0a8e9e
1 changed files with 1 additions and 5 deletions
|
@ -57,11 +57,7 @@ func (a *assembler) buildChainRange(ctx context.Context, prevID oid.ID) ([]oid.I
|
||||||
)
|
)
|
||||||
|
|
||||||
// fill the chain end-to-start
|
// fill the chain end-to-start
|
||||||
for hasPrev {
|
for hasPrev && from < a.currentOffset {
|
||||||
if a.currentOffset <= from {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
head, err := a.objGetter.HeadObject(ctx, prevID)
|
head, err := a.objGetter.HeadObject(ctx, prevID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
|
|
Loading…
Add table
Reference in a new issue