summaryrefslogtreecommitdiff
path: root/t/unit-tests/t-reftable-stack.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-10-02 12:55:54 +0200
committerJunio C Hamano <gitster@pobox.com>2024-10-02 07:53:53 -0700
commit802c0646ac3c04a16adafde5e7cf899f5fc46821 (patch)
treefc6191e41a0978d6b8cc9ff0d14a38fabe46f9dd /t/unit-tests/t-reftable-stack.c
parent74d1c18757d1a45b95e46836adf478193a34c42c (diff)
reftable/merged: handle allocation failures in `merged_table_init_iter()`
Handle allocation failures in `merged_table_init_iter()`. While at it, merge `merged_iter_init()` into the function. It only has a single caller and merging them makes it easier to handle allocation failures consistently. This change also requires us to adapt `reftable_stack_init_*_iterator()` to bubble up the new error codes of `merged_table_iter_init()`. Adapt callsites accordingly. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/unit-tests/t-reftable-stack.c')
-rw-r--r--t/unit-tests/t-reftable-stack.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/t/unit-tests/t-reftable-stack.c b/t/unit-tests/t-reftable-stack.c
index 65e513d5ec..6e41a4cf7e 100644
--- a/t/unit-tests/t-reftable-stack.c
+++ b/t/unit-tests/t-reftable-stack.c
@@ -599,7 +599,9 @@ static void t_reftable_stack_iterator(void)
reftable_iterator_destroy(&it);
- reftable_stack_init_log_iterator(st, &it);
+ err = reftable_stack_init_log_iterator(st, &it);
+ check(!err);
+
reftable_iterator_seek_log(&it, logs[0].refname);
for (i = 0; ; i++) {
struct reftable_log_record log = { 0 };