diff options
author | chinglee-iot <61685396+chinglee-iot@users.noreply.github.com> | 2023-11-28 14:21:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-28 14:21:03 +0300 |
commit | 1813a4551e4edbba215b6f1cb3c484c41d369f96 (patch) | |
tree | cdd5d5dde9853bb162e8e64074e9f092ad56dc42 /queue.c | |
parent | ce88adea2a043dca6104e4fd80b920166cade8c8 (diff) |
Fix MISRA 2012 rule 10.4 violations (#852)
Fix MISRA 2012 rule 10.4 violations
Diffstat (limited to 'queue.c')
-rw-r--r-- | queue.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -389,8 +389,8 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue, /* A queue storage area should be provided if the item size is not 0, and * should not be provided if the item size is 0. */ - ( !( ( pucQueueStorage != NULL ) && ( uxItemSize == 0 ) ) ) && - ( !( ( pucQueueStorage == NULL ) && ( uxItemSize != 0 ) ) ) ) + ( !( ( pucQueueStorage != NULL ) && ( uxItemSize == 0U ) ) ) && + ( !( ( pucQueueStorage == NULL ) && ( uxItemSize != 0U ) ) ) ) { #if ( configASSERT_DEFINED == 1 ) { @@ -864,7 +864,7 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength, traceENTER_xQueueCreateCountingSemaphoreStatic( uxMaxCount, uxInitialCount, pxStaticQueue ); - if( ( uxMaxCount != 0 ) && + if( ( uxMaxCount != 0U ) && ( uxInitialCount <= uxMaxCount ) ) { xHandle = xQueueGenericCreateStatic( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, NULL, pxStaticQueue, queueQUEUE_TYPE_COUNTING_SEMAPHORE ); @@ -903,7 +903,7 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength, traceENTER_xQueueCreateCountingSemaphore( uxMaxCount, uxInitialCount ); - if( ( uxMaxCount != 0 ) && + if( ( uxMaxCount != 0U ) && ( uxInitialCount <= uxMaxCount ) ) { xHandle = xQueueGenericCreate( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_COUNTING_SEMAPHORE ); |