From e2bea628150e698a528deb933ccef134e1d9f757 Mon Sep 17 00:00:00 2001 From: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com> Date: Sun, 18 Feb 2024 20:09:49 +0000 Subject: [PATCH] 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. --- tasks.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tasks.c b/tasks.c index 7604d9b8a..6c399dbf5 100644 --- a/tasks.c +++ b/tasks.c @@ -3506,9 +3506,6 @@ static BaseType_t prvCreateIdleTasks( void ) TaskFunction_t pxIdleTaskFunction = NULL; 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++ ) { cIdleName[ xIdleTaskNameIndex ] = configIDLE_TASK_NAME[ xIdleTaskNameIndex ]; @@ -3520,12 +3517,6 @@ static BaseType_t prvCreateIdleTasks( void ) { 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 { mtCOVERAGE_TEST_MARKER();