From: lurchi Date: Mon, 22 Jan 2018 17:46:36 +0000 (+0100) Subject: remove unnecessary check X-Git-Tag: v0.11.0pre66~237 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=809029c8a4449ca670b9bd7fbb8ee0bbf33fb1f7;p=oweals%2Fgnunet.git remove unnecessary check The reason field of tasks in the pending_timeout queue is never modified while the tasks are in the queue --- 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;