From: lurchi Date: Tue, 16 Jan 2018 17:44:58 +0000 (+0100) Subject: return now if we found a task that is ready (optimization) X-Git-Tag: v0.11.0pre66~248^2~7 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fc3aa3c0764eb1eca804ae6bee2145b7886d7e62;p=oweals%2Fgnunet.git return now if we found a task that is ready (optimization) --- diff --git a/src/util/scheduler.c b/src/util/scheduler.c index a14d4f1d7..0e7a16275 100644 --- a/src/util/scheduler.c +++ b/src/util/scheduler.c @@ -424,7 +424,7 @@ get_timeout () { if (0 != pos->reason) { - timeout = now; + return now; } else { @@ -435,7 +435,7 @@ get_timeout () { if (0 != pos->reason) { - timeout = now; + return now; } else if ((pos->timeout.abs_value_us != GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us) && (timeout.abs_value_us > pos->timeout.abs_value_us))