From 53b05de491440ab13c347dede820c783acfce6b1 Mon Sep 17 00:00:00 2001 From: bradleysmith23 <74752142+bradleysmith23@users.noreply.github.com> Date: Fri, 2 Feb 2024 15:00:46 -0800 Subject: [PATCH] Remove temp variable for uxCurrentNumberOfTasks Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com> --- tasks.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tasks.c b/tasks.c index 7cb68e809..975d6703c 100644 --- a/tasks.c +++ b/tasks.c @@ -3192,9 +3192,8 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode, /* Use temp variable as distinct sequence points for reading * volatile variables prior to a comparison, per the coding guidelines */ UBaseType_t uxCurrentListLength = listCURRENT_LIST_LENGTH( &xSuspendedTaskList ); - UBaseType_t uxCurrentNumOfTasks = uxCurrentNumberOfTasks; - if( uxCurrentListLength == uxCurrentNumOfTasks ) + if( uxCurrentListLength == uxCurrentNumberOfTasks ) { /* No other tasks are ready, so set pxCurrentTCB back to * NULL so when the next task is created pxCurrentTCB will