From: Lennart Poettering Date: Wed, 20 Nov 2013 02:58:05 +0000 (+0100) Subject: sd-event: fix comparison functions X-Git-Tag: v209~1378 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=a99badf5ed3b2207a19f5b44c549c5e7584dfd83 sd-event: fix comparison functions --- diff --git a/src/libsystemd-bus/sd-event.c b/src/libsystemd-bus/sd-event.c index 5cb3bccc5..eab92bded 100644 --- a/src/libsystemd-bus/sd-event.c +++ b/src/libsystemd-bus/sd-event.c @@ -234,7 +234,7 @@ static int earliest_time_prioq_compare(const void *a, const void *b) { if (x->time.next < y->time.next) return -1; if (x->time.next > y->time.next) - return -1; + return 1; /* Stability for the rest */ if (x < y) @@ -267,7 +267,7 @@ static int latest_time_prioq_compare(const void *a, const void *b) { if (x->time.next + x->time.accuracy < y->time.next + y->time.accuracy) return -1; if (x->time.next + x->time.accuracy > y->time.next + y->time.accuracy) - return -1; + return 1; /* Stability for the rest */ if (x < y)