From bbddd2b8d9b06bfef8b3eb58f53144fa64995083 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 16 Oct 2018 21:56:46 +0900 Subject: [PATCH] test: use CMP() macro at one more place --- src/test/test-prioq.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/test/test-prioq.c b/src/test/test-prioq.c index f7fb5ce422..57147a166f 100644 --- a/src/test/test-prioq.c +++ b/src/test/test-prioq.c @@ -54,13 +54,7 @@ struct test { static int test_compare(const void *a, const void *b) { const struct test *x = a, *y = b; - if (x->value < y->value) - return -1; - - if (x->value > y->value) - return 1; - - return 0; + return CMP(x->value, y->value); } static void test_hash(const void *a, struct siphash *state) { -- 2.25.1