summaryrefslogtreecommitdiffstats
path: root/src/test/test-prioq.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:42 +0000
commit78e9bb837c258ac0ec7712b3d612cc2f407e731e (patch)
treef515d16b6efd858a9aeb5b0ef5d6f90bf288283d /src/test/test-prioq.c
parentAdding debian version 255.5-1. (diff)
downloadsystemd-78e9bb837c258ac0ec7712b3d612cc2f407e731e.tar.xz
systemd-78e9bb837c258ac0ec7712b3d612cc2f407e731e.zip
Merging upstream version 256.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/test-prioq.c')
-rw-r--r--src/test/test-prioq.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/test-prioq.c b/src/test/test-prioq.c
index 540863c..92c22d3 100644
--- a/src/test/test-prioq.c
+++ b/src/test/test-prioq.c
@@ -54,7 +54,7 @@ static int test_compare(const struct test *x, const struct test *y) {
}
static void test_hash(const struct test *x, struct siphash *state) {
- siphash24_compress(&x->value, sizeof(x->value), state);
+ siphash24_compress_typesafe(x->value, state);
}
DEFINE_PRIVATE_HASH_OPS(test_hash_ops, struct test, test_hash, test_compare);
@@ -70,10 +70,10 @@ TEST(struct) {
assert_se(q = prioq_new((compare_func_t) test_compare));
assert_se(s = set_new(&test_hash_ops));
- assert_se(prioq_peek(q) == NULL);
- assert_se(prioq_peek_by_index(q, 0) == NULL);
- assert_se(prioq_peek_by_index(q, 1) == NULL);
- assert_se(prioq_peek_by_index(q, UINT_MAX) == NULL);
+ ASSERT_NULL(prioq_peek(q));
+ ASSERT_NULL(prioq_peek_by_index(q, 0));
+ ASSERT_NULL(prioq_peek_by_index(q, 1));
+ ASSERT_NULL(prioq_peek_by_index(q, UINT_MAX));
for (i = 0; i < SET_SIZE; i++) {
assert_se(t = new0(struct test, 1));
@@ -87,7 +87,7 @@ TEST(struct) {
for (i = 0; i < SET_SIZE; i++)
assert_se(prioq_peek_by_index(q, i));
- assert_se(prioq_peek_by_index(q, SET_SIZE) == NULL);
+ ASSERT_NULL(prioq_peek_by_index(q, SET_SIZE));
unsigned count = 0;
PRIOQ_FOREACH_ITEM(q, t) {