mirror of
https://github.com/systemd/systemd
synced 2024-09-20 00:21:55 +00:00
bus: fix duplicate comparisons
Testing for y > x is the same as testing for x < y.
This commit is contained in:
parent
d682b3a7e7
commit
dfcd88f634
|
@ -144,7 +144,7 @@ static int pending_prioq_compare(const void *a, const void *b) {
|
|||
/* Stability for the rest */
|
||||
if (x < y)
|
||||
return -1;
|
||||
if (y > x)
|
||||
if (x > y)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
@ -179,7 +179,7 @@ static int prepare_prioq_compare(const void *a, const void *b) {
|
|||
/* Stability for the rest */
|
||||
if (x < y)
|
||||
return -1;
|
||||
if (y > x)
|
||||
if (x > y)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
@ -212,7 +212,7 @@ static int time_prioq_compare(const void *a, const void *b) {
|
|||
/* Stability for the rest */
|
||||
if (x < y)
|
||||
return -1;
|
||||
if (y > x)
|
||||
if (x > y)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue