Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2023-12-11 12:08:07 +0300
committerJunio C Hamano <gitster@pobox.com>2023-12-11 18:23:17 +0300
commita8305bc6d8eb55cf52264964c8fc0289b72f2fd8 (patch)
treeb42facff286a99ea07ac7b5abb294b54a2843c27 /reftable/reader.c
parent829231dc203f777a32ebdbbaf66e7661a21ac74a (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/reader.c')
-rw-r--r--reftable/reader.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/reftable/reader.c b/reftable/reader.c
index b4db23ce18..9de64f50b4 100644
--- a/reftable/reader.c
+++ b/reftable/reader.c
@@ -224,10 +224,9 @@ struct table_iter {
struct block_iter bi;
int is_finished;
};
-#define TABLE_ITER_INIT \
- { \
- .bi = {.last_key = STRBUF_INIT } \
- }
+#define TABLE_ITER_INIT { \
+ .bi = BLOCK_ITER_INIT \
+}
static void table_iter_copy_from(struct table_iter *dest,
struct table_iter *src)