]> git.ipfire.org Git - thirdparty/git.git/commit
reftable/reader: be more careful about errors in indexed seeks
authorPatrick Steinhardt <ps@pks.im>
Thu, 1 Feb 2024 07:51:56 +0000 (08:51 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 1 Feb 2024 19:11:32 +0000 (11:11 -0800)
commitd55fc5128b26a64c2e7b6612d0442c9e924696e8
treeea29fad2f2503e9a8dc1741c88327c1e88a4ef33
parent77d1ae47937f35352efe22a960b544088f2f6158
reftable/reader: be more careful about errors in indexed seeks

When doing an indexed seek we first need to do a linear seek in order to
find the index block for our wanted key. We do not check the returned
error of the linear seek though. This is likely not an issue because the
next call to `table_iter_next()` would return error, too. But it very
much is a code smell when an error variable is being assigned to without
actually checking it.

Safeguard the code by checking for errors.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
reftable/reader.c