[#1616] getsvc: Move break condition from body to the loop condition
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 35s
Vulncheck / Vulncheck (push) Successful in 1m1s
Pre-commit hooks / Pre-commit (push) Successful in 1m44s
Build / Build Components (push) Successful in 2m5s
Tests and linters / Staticcheck (push) Successful in 2m28s
Tests and linters / Lint (push) Successful in 3m17s
OCI image / Build container images (push) Successful in 4m16s
Tests and linters / Tests (push) Successful in 4m50s
Tests and linters / gopls check (push) Successful in 5m50s
Tests and linters / Tests with -race (push) Successful in 5m56s

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2025-01-29 12:23:05 +03:00 committed by Evgenii Stratonikov
parent b309b34bfc
commit 57dc0a8e9e

View file

@ -57,11 +57,7 @@ func (a *assembler) buildChainRange(ctx context.Context, prevID oid.ID) ([]oid.I
)
// fill the chain end-to-start
for hasPrev {
if a.currentOffset <= from {
break
}
for hasPrev && from < a.currentOffset {
head, err := a.objGetter.HeadObject(ctx, prevID)
if err != nil {
return nil, nil, err