From 809029c8a4449ca670b9bd7fbb8ee0bbf33fb1f7 Mon Sep 17 00:00:00 2001 From: lurchi Date: Mon, 22 Jan 2018 18:46:36 +0100 Subject: [PATCH] remove unnecessary check The reason field of tasks in the pending_timeout queue is never modified while the tasks are in the queue --- src/util/scheduler.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/util/scheduler.c b/src/util/scheduler.c index 2970d3c25..6a1b1a22d 100644 --- a/src/util/scheduler.c +++ b/src/util/scheduler.c @@ -1085,9 +1085,7 @@ GNUNET_SCHEDULER_add_at_with_priority (struct GNUNET_TIME_Absolute at, pos = pending_timeout_head; else pos = prev->next; - while ( (NULL != pos) && - ( (pos->timeout.abs_value_us <= t->timeout.abs_value_us) || - (0 != pos->reason) ) ) + while ((NULL != pos) && (pos->timeout.abs_value_us <= t->timeout.abs_value_us)) { prev = pos; pos = pos->next; -- 2.25.1