Revert change to tasks.c

Since configIDLE_TASK_NAME must be defined as a string according to
the documentation, the macro will always be NULL terminated. Which
means that the check `if( cIdleName[ xIdleTaskNameIndex ] == ( char ) 0x00 )`
will catch the end of string.
This commit is contained in:
Aniruddha Kanhere 2024-02-18 20:09:49 +00:00
parent 5e79ee6ee1
commit e2bea62815

View file

@ -3506,9 +3506,6 @@ static BaseType_t prvCreateIdleTasks( void )
TaskFunction_t pxIdleTaskFunction = NULL; TaskFunction_t pxIdleTaskFunction = NULL;
BaseType_t xIdleTaskNameIndex; BaseType_t xIdleTaskNameIndex;
/* Make sure that the below for loop doesn't go over the configIDLE_TASK_NAME macro. */
//configASSERT( sizeof( configIDLE_TASK_NAME ) >= configMAX_TASK_NAME_LEN );
for( xIdleTaskNameIndex = ( BaseType_t ) 0; xIdleTaskNameIndex < ( BaseType_t ) configMAX_TASK_NAME_LEN; xIdleTaskNameIndex++ ) for( xIdleTaskNameIndex = ( BaseType_t ) 0; xIdleTaskNameIndex < ( BaseType_t ) configMAX_TASK_NAME_LEN; xIdleTaskNameIndex++ )
{ {
cIdleName[ xIdleTaskNameIndex ] = configIDLE_TASK_NAME[ xIdleTaskNameIndex ]; cIdleName[ xIdleTaskNameIndex ] = configIDLE_TASK_NAME[ xIdleTaskNameIndex ];
@ -3520,12 +3517,6 @@ static BaseType_t prvCreateIdleTasks( void )
{ {
break; break;
} }
else if( xIdleTaskNameIndex >= ( BaseType_t ) sizeof( configIDLE_TASK_NAME ) )
{
/* Break out of the loop so that we do not exceed the string
* configIDLE_TASK_NAME. */
break;
}
else else
{ {
mtCOVERAGE_TEST_MARKER(); mtCOVERAGE_TEST_MARKER();