Skip to content

Commit

Permalink
Minor code review suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: Gaurav Aggarwal <[email protected]>
  • Loading branch information
aggarg committed Dec 19, 2024
1 parent e0f9e6c commit 2dfe9e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tasks.c
Original file line number Diff line number Diff line change
Expand Up @@ -3530,13 +3530,13 @@ static BaseType_t prvCreateIdleTasks( void )
BaseType_t xIdleNameLen;
BaseType_t xCopyLen;

configASSERT( configIDLE_TASK_NAME != NULL && configMAX_TASK_NAME_LEN > 3 );
configASSERT( ( configIDLE_TASK_NAME != NULL ) && ( configMAX_TASK_NAME_LEN > 3 ) );

/* 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
* for the core ID suffix and the null-terminator. */
xIdleNameLen = sizeof( configIDLE_TASK_NAME ) - 1;
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++ )
{
Expand Down

0 comments on commit 2dfe9e6

Please sign in to comment.