r8886: Exchange the arguments of timeval_compare, this makes it behave like strcmp.
[tprouty/samba.git] / source / lib / events / events_standard.c
index 16c9464fd089b46be768fdc797708f3f86ef3086..810e8bbca30ec67f9e06c16ec7c6aa27d823bf1f 100644 (file)
@@ -311,7 +311,8 @@ static struct timed_event *std_event_add_timed(struct event_context *ev, TALLOC_
        for (cur_te = std_ev->timed_events; cur_te; cur_te = cur_te->next) {
                /* if the new event comes before the current one break */
                if (!timeval_is_zero(&cur_te->next_event) &&
-                   timeval_compare(&cur_te->next_event, &te->next_event) < 0) {
+                   timeval_compare(&te->next_event,
+                                   &cur_te->next_event) < 0) {
                        break;
                }