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