From c19b13cdfc326b55e4b7016333a58053400674c7 Mon Sep 17 00:00:00 2001 From: bradleysmith23 <74752142+bradleysmith23@users.noreply.github.com> Date: Fri, 2 Feb 2024 14:28:43 -0800 Subject: [PATCH] Fix MISRA C 2012 Rule 14.4 Violations. (#975) * Fix MISRA rule 14.4 violations. * Use pdFALSE instead of 0 in comparison Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com> * Uncrustify: triggered by comment. * Run Github Actions. --------- Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com> Co-authored-by: GitHub Action Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com> --- tasks.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tasks.c b/tasks.c index 037ca2af9..b0af5ffbe 100644 --- a/tasks.c +++ b/tasks.c @@ -175,17 +175,17 @@ /*-----------------------------------------------------------*/ #if ( configNUMBER_OF_CORES == 1 ) - #define taskSELECT_HIGHEST_PRIORITY_TASK() \ - do { \ - UBaseType_t uxTopPriority = uxTopReadyPriority; \ - \ - /* Find the highest priority queue that contains ready tasks. */ \ - while( listLIST_IS_EMPTY( &( pxReadyTasksLists[ uxTopPriority ] ) ) ) \ - { \ - configASSERT( uxTopPriority ); \ - --uxTopPriority; \ - } \ - \ + #define taskSELECT_HIGHEST_PRIORITY_TASK() \ + do { \ + UBaseType_t uxTopPriority = uxTopReadyPriority; \ + \ + /* Find the highest priority queue that contains ready tasks. */ \ + while( listLIST_IS_EMPTY( &( pxReadyTasksLists[ uxTopPriority ] ) ) != pdFALSE ) \ + { \ + configASSERT( uxTopPriority ); \ + --uxTopPriority; \ + } \ + \ /* listGET_OWNER_OF_NEXT_ENTRY indexes through the list, so the tasks of \ * the same priority get an equal share of the processor time. */ \ listGET_OWNER_OF_NEXT_ENTRY( pxCurrentTCB, &( pxReadyTasksLists[ uxTopPriority ] ) ); \