X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Ftest%2Ftest-prioq.c;h=dfedc9b8dce32000886baec72ddd75a85edcb249;hb=0e707326fcecd3968efa7dc827123032f1b2cb61;hp=cdb1e4ad52df3768253b957373ff9954b5f7f3ba;hpb=9bf3b53533cdc9b95c921b71da755401f223f765;p=elogind.git diff --git a/src/test/test-prioq.c b/src/test/test-prioq.c index cdb1e4ad5..dfedc9b8d 100644 --- a/src/test/test-prioq.c +++ b/src/test/test-prioq.c @@ -98,6 +98,11 @@ static unsigned long test_hash(const void *a, const uint8_t hash_key[HASH_KEY_SI return (unsigned long) u; } +static const struct hash_ops test_hash_ops = { + .hash = test_hash, + .compare = test_compare +}; + static void test_struct(void) { Prioq *q; Set *s; @@ -109,7 +114,7 @@ static void test_struct(void) { q = prioq_new(test_compare); assert_se(q); - s = set_new(test_hash, test_compare); + s = set_new(&test_hash_ops); assert_se(s); for (i = 0; i < SET_SIZE; i++) {