From 9b48c629f237b8c990a6aca776fb9eda96c3d871 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 24 Sep 2019 07:02:40 +0200 Subject: [PATCH] CLEANUP: task: remove impossible test 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/task.c b/src/task.c index 9aa76463c..33ce05fca 100644 --- a/src/task.c +++ b/src/task.c @@ -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; }