Fix MISRA 2012 rule 10.4 violations (#852)
Fix MISRA 2012 rule 10.4 violations
diff --git a/queue.c b/queue.c
index 3bc9597..ffb180e 100644
--- a/queue.c
+++ b/queue.c
@@ -389,8 +389,8 @@
/* 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 @@
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 @@
traceENTER_xQueueCreateCountingSemaphore( uxMaxCount, uxInitialCount );
- if( ( uxMaxCount != 0 ) &&
+ if( ( uxMaxCount != 0U ) &&
( uxInitialCount <= uxMaxCount ) )
{
xHandle = xQueueGenericCreate( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_COUNTING_SEMAPHORE );