diff options
author | Patrick Steinhardt <ps@pks.im> | 2023-12-11 12:08:07 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-12-11 18:23:17 +0300 |
commit | a8305bc6d8eb55cf52264964c8fc0289b72f2fd8 (patch) | |
tree | b42facff286a99ea07ac7b5abb294b54a2843c27 /reftable/block_test.c | |
parent | 829231dc203f777a32ebdbbaf66e7661a21ac74a (diff) |
reftable/block: introduce macro to initialize `struct block_iter`
There are a bunch of locations where we initialize members of `struct
block_iter`, which makes it harder than necessary to expand this struct
to have additional members. Unify the logic via a new `BLOCK_ITER_INIT`
macro that initializes all members.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reftable/block_test.c')
-rw-r--r-- | reftable/block_test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/reftable/block_test.c b/reftable/block_test.c index cb88af4a56..c00bbc8aed 100644 --- a/reftable/block_test.c +++ b/reftable/block_test.c @@ -32,7 +32,7 @@ static void test_block_read_write(void) int i = 0; int n; struct block_reader br = { 0 }; - struct block_iter it = { .last_key = STRBUF_INIT }; + struct block_iter it = BLOCK_ITER_INIT; int j = 0; struct strbuf want = STRBUF_INIT; @@ -87,7 +87,7 @@ static void test_block_read_write(void) block_iter_close(&it); for (i = 0; i < N; i++) { - struct block_iter it = { .last_key = STRBUF_INIT }; + struct block_iter it = BLOCK_ITER_INIT; strbuf_reset(&want); strbuf_addstr(&want, names[i]); |