X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fhtable%2Ftest%2Frun-copy.c;h=f8a35006085d6efa5dc96e34f3f5fd0cf0473eb1;hp=02d5bbe46856daef1689c784152bee6c218ea806;hb=9e92552b1b2a1b631bde1c379b9f2950725b1245;hpb=f359fde1b7c3ca60faebd4df710bf30a68784e27 diff --git a/ccan/htable/test/run-copy.c b/ccan/htable/test/run-copy.c index 02d5bbe4..f8a35006 100644 --- a/ccan/htable/test/run-copy.c +++ b/ccan/htable/test/run-copy.c @@ -6,7 +6,7 @@ #define NUM_VALS 512 -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; @@ -17,7 +17,7 @@ static bool cmp(const void *candidate, void *ptr) return *(const uint64_t *)candidate == *(const uint64_t *)ptr; } -int main(int argc, char *argv[]) +int main(void) { struct htable ht, ht2; uint64_t val[NUM_VALS], i; @@ -28,8 +28,8 @@ int main(int argc, char *argv[]) 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]); }