Skip to content

Commit

Permalink
t-reftable-merged: check realloc errors
Browse files Browse the repository at this point in the history
Report reallocation errors in unit tests, like everywhere else.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
rscharfe authored and gitster committed Dec 26, 2024
1 parent 8584c30 commit 8753574
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions t/unit-tests/t-reftable-merged.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ static void t_merged_refs(void)
if (err > 0)
break;

REFTABLE_ALLOC_GROW(out, len + 1, cap);
check(!REFTABLE_ALLOC_GROW(out, len + 1, cap));
out[len++] = ref;
}
reftable_iterator_destroy(&it);
Expand Down Expand Up @@ -459,7 +459,7 @@ static void t_merged_logs(void)
if (err > 0)
break;

REFTABLE_ALLOC_GROW(out, len + 1, cap);
check(!REFTABLE_ALLOC_GROW(out, len + 1, cap));
out[len++] = log;
}
reftable_iterator_destroy(&it);
Expand Down

0 comments on commit 8753574

Please sign in to comment.