]> git.ozlabs.org Git - ccan/blobdiff - ccan/htable/test/run-size.c
configurator: Enable running configurator in wrapper
[ccan] / ccan / htable / test / run-size.c
index 5b3263895ca83ad28bcb3312122c4bb3c056be41..090ff99683428b30ac3b070b88a4e2df0238a69f 100644 (file)
@@ -8,7 +8,7 @@
 
 /* We use the number divided by two as the hash (for lots of
    collisions). */
-static size_t hash(const void *elem, void *unused)
+static size_t hash(const void *elem, void *unused UNNEEDED)
 {
        size_t h = *(uint64_t *)elem / 2;
        return h;
@@ -26,8 +26,8 @@ int main(void)
 
        htable_init(&ht, hash, NULL);
        for (i = 0; i < NUM_VALS; i++) {
-               ok1(ht.max >= i);
-               ok1(ht.max <= i * 2);
+               ok1(ht_max(&ht) >= i);
+               ok1(ht_max(&ht) <= i * 2);
                htable_add(&ht, hash(&val[i], NULL), &val[i]);
        }
        htable_clear(&ht);