From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id EC63F1F44D for ; Sun, 24 Mar 2024 09:26:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1711272407; bh=dEys3V09NyfME1QeiokPFMql68pkfxRaCMR9aIwiFtw=; h=From:To:Subject:Date:From; b=t3me2BgLI4b0ELLfCGu4wJdeijdVDeq+X6GyYKIBWA+X3x/I0NJMYfx26E7poLIRb VH2Mpe4ZfMHnFt+sN0YJ2Zy1dKsqgf9v4zvCqiZmeAThRxvViTPwqBQkgKISTBe5GY neeY9g5EcM9a6CkauYZrvYkk3TMDZ0tmrD1gF9T4= From: Eric Wong To: spew@80x24.org Subject: [PATCH 1/2] list-objects-filter: use kh_size API Date: Sun, 24 Mar 2024 09:26:45 +0000 Message-ID: <20240324092646.1083487-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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 --- 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);