[PATCH 1/3] list-objects-filter: use kh_size API
- From
- Eric Wong <e@80x24.org>
- Date
- Mar 28, 2024, 10:13 UTC
- Message-ID
- <20240328101356.300374-2-e@80x24.org>
- In-Reply-To
- <20240328101356.300374-1-e@80x24.org>
In order to ease a potential migration to from khash to khashl, use the kh_size() macro instead of accessing the .size field directly.
Signed-off-by: Eric Wong <e@80x24.org> --- list-objects-filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/list-objects-filter.c b/list-objects-filter.c index 4346f8da45..440f112d23 100644 --- a/list-objects-filter.c +++ b/list-objects-filter.c @@ -704,7 +704,7 @@ static void filter_combine__free(void *filter_data) for (sub = 0; sub < d->nr; sub++) { list_objects_filter__free(d->sub[sub].filter); oidset_clear(&d->sub[sub].seen); - if (d->sub[sub].omits.set.size) + if (kh_size(&d->sub[sub].omits.set)) BUG("expected oidset to be cleared already"); } free(d->sub);