summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTero Roponen <tero.roponen@gmail.com>2013-10-10 08:14:24 +0300
committerLennart Poettering <lennart@poettering.net>2013-10-10 18:37:48 +0200
commitdfcd88f6347886f93973f810ee77a90685dda777 (patch)
treedcca15e732362ae6d5bbac655585e3158525f109 /src
parentd682b3a7e7c7c2941a4d3e193f1e330dbc9fae89 (diff)
bus: fix duplicate comparisons
Testing for y > x is the same as testing for x < y.
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd-bus/sd-event.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd-bus/sd-event.c b/src/libsystemd-bus/sd-event.c
index 069e4fb820..de96fde8e2 100644
--- a/src/libsystemd-bus/sd-event.c
+++ b/src/libsystemd-bus/sd-event.c
@@ -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;