reftable/block: merge block_iter_seek() and block_reader_seek()

The function `block_iter_seek()` is merely a simple wrapper around
`block_reader_seek()`. Merge those two functions into a new function
`block_iter_seek_key()` that more clearly says what it is actually
doing.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2024-04-08 14:16:31 +02:00
committed by Junio C Hamano
parent 3122d44025
commit 42c7bdc36d
4 changed files with 8 additions and 16 deletions

View File

@ -483,7 +483,7 @@ static int reader_seek_linear(struct table_iter *ti,
table_iter_copy_from(ti, &next);
}
err = block_iter_seek(&ti->bi, &want_key);
err = block_iter_seek_key(&ti->bi, ti->bi.br, &want_key);
if (err < 0)
goto done;
err = 0;
@ -558,7 +558,7 @@ static int reader_seek_indexed(struct reftable_reader *r,
if (err != 0)
goto done;
err = block_iter_seek(&next.bi, &want_index.u.idx.last_key);
err = block_iter_seek_key(&next.bi, next.bi.br, &want_index.u.idx.last_key);
if (err < 0)
goto done;