mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Use strlen instead of sizeof.
This allows using pointer to string for configIDLE_TASK_NAME. Coverage tests do that. Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
parent
2dfe9e6832
commit
8dc4c8338a
2
tasks.c
2
tasks.c
|
@ -3535,7 +3535,7 @@ static BaseType_t prvCreateIdleTasks( void )
|
||||||
/* The length of the idle task name is limited to the minimum of the length
|
/* The length of the idle task name is limited to the minimum of the length
|
||||||
* of configIDLE_TASK_NAME and configMAX_TASK_NAME_LEN - 2, keeping space
|
* of configIDLE_TASK_NAME and configMAX_TASK_NAME_LEN - 2, keeping space
|
||||||
* for the core ID suffix and the null-terminator. */
|
* for the core ID suffix and the null-terminator. */
|
||||||
xIdleNameLen = sizeof( configIDLE_TASK_NAME ) - 1;
|
xIdleNameLen = strlen( configIDLE_TASK_NAME );
|
||||||
xCopyLen = xIdleNameLen < ( configMAX_TASK_NAME_LEN - 2 ) ? xIdleNameLen : ( configMAX_TASK_NAME_LEN - 2 );
|
xCopyLen = xIdleNameLen < ( configMAX_TASK_NAME_LEN - 2 ) ? xIdleNameLen : ( configMAX_TASK_NAME_LEN - 2 );
|
||||||
|
|
||||||
for( xIdleTaskNameIndex = ( BaseType_t ) 0; xIdleTaskNameIndex < xCopyLen; xIdleTaskNameIndex++ )
|
for( xIdleTaskNameIndex = ( BaseType_t ) 0; xIdleTaskNameIndex < xCopyLen; xIdleTaskNameIndex++ )
|
||||||
|
|
Loading…
Reference in a new issue