summaryrefslogtreecommitdiffstats
path: root/src/queue.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/queue.c')
-rw-r--r--src/queue.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/queue.c b/src/queue.c
index a2ef3dc..2509538 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -30,11 +30,6 @@
#include <stdint.h>
-static inline bool after(const struct timespec *tp1, const struct timespec *tp2) {
- return (tp1->tv_sec > tp2->tv_sec ||
- (tp1->tv_sec == tp2->tv_sec && tp1->tv_nsec > tp2->tv_nsec));
-}
-
void fastd_queue_put(fastd_context *ctx, fastd_queue *queue, fastd_queue_entry *entry, int timeout) {
entry->timeout = ctx->now;
@@ -50,7 +45,7 @@ void fastd_queue_put(fastd_context *ctx, fastd_queue *queue, fastd_queue_entry *
fastd_queue_entry **current;
for (current = &queue->head;; current = &(*current)->next) {
- if (!(*current) || after(&(*current)->timeout, &entry->timeout)) {
+ if (!(*current) || timespec_after(&(*current)->timeout, &entry->timeout)) {
entry->next = *current;
*current = entry;
break;