chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d682b3a
)
bus: fix duplicate comparisons
author
Tero Roponen
<tero.roponen@gmail.com>
Thu, 10 Oct 2013 05:14:24 +0000
(08:14 +0300)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 10 Oct 2013 16:37:48 +0000
(18:37 +0200)
Testing for y > x is the same as testing for x < y.
src/libsystemd-bus/sd-event.c
patch
|
blob
|
history
diff --git
a/src/libsystemd-bus/sd-event.c
b/src/libsystemd-bus/sd-event.c
index 069e4fb820f0ad65fec861c40636ddb65e67e759..de96fde8e242c5ca633c1ddd528231e581cc6421 100644
(file)
--- 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;