diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-10-16 21:56:46 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-10-16 21:56:46 +0900 |
commit | bbddd2b8d9b06bfef8b3eb58f53144fa64995083 (patch) | |
tree | a5360b2881b28cb18f04f242c6790785956f58e1 /src/test/test-prioq.c | |
parent | 2011149a3c42c631c4168b7d5d4ec01bc87d8ee6 (diff) | |
download | systemd-bbddd2b8d9b06bfef8b3eb58f53144fa64995083.tar.gz |
test: use CMP() macro at one more place
Diffstat (limited to 'src/test/test-prioq.c')
-rw-r--r-- | src/test/test-prioq.c | 8 |
1 files changed, 1 insertions, 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) { |