Skip to content

Commit 01a587d

Browse files
pks-tgitster
authored andcommitted
reftable/reader: stop using ARRAY_SIZE() macro
We have a single user of the `ARRAY_SIZE()` macro in the reftable reader. Drop its use to reduce our dependence on the Git codebase. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e676694 commit 01a587d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

reftable/reader.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ int reftable_reader_print_blocks(const char *tablename)
849849
printf("header:\n");
850850
printf(" block_size: %d\n", r->block_size);
851851

852-
for (i = 0; i < ARRAY_SIZE(sections); i++) {
852+
for (i = 0; i < sizeof(sections) / sizeof(*sections); i++) {
853853
err = table_iter_seek_start(&ti, sections[i].type, 0);
854854
if (err < 0)
855855
goto done;

0 commit comments

Comments
 (0)