]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: task: remove impossible test
authorWilly Tarreau <w@1wt.eu>
Tue, 24 Sep 2019 05:02:40 +0000 (07:02 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 24 Sep 2019 09:23:30 +0000 (11:23 +0200)
In process_runnable_task(), after the task's process() function returns,
we used to check if the return is not NULL and is not a tasklet, to update
profiling measurements. This is useless since only tasks can return non-null
here. Let's remove this useless test.

src/task.c

index 9aa76463ca88601b715eab6a3147fcac518770f0..33ce05fca06f77a8da1ea2c6ea6bc6588565e636 100644 (file)
@@ -431,7 +431,7 @@ void process_runnable_tasks()
                 * immediately, else we defer it into wait queue
                 */
                if (t != NULL) {
-                       if (unlikely(!TASK_IS_TASKLET(t) && t->call_date)) {
+                       if (unlikely(t->call_date)) {
                                t->cpu_time += now_mono_time() - t->call_date;
                                t->call_date = 0;
                        }