From 0c0f9f3f624021d52006486e2f4c5a11c2740e8c Mon Sep 17 00:00:00 2001 From: Rahul Kar Date: Thu, 18 Apr 2024 08:33:47 +0000 Subject: [PATCH] Fix UBaseType_t conversion in list.c --- list.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/list.c b/list.c index 87fa7aba3..fc99538b2 100644 --- a/list.c +++ b/list.c @@ -130,7 +130,7 @@ void vListInsertEnd( List_t * const pxList, /* Remember which list the item is in. */ pxNewListItem->pxContainer = pxList; - ( pxList->uxNumberOfItems ) += ( UBaseType_t ) 1U; + ( pxList->uxNumberOfItems ) = ( UBaseType_t ) ( pxList->uxNumberOfItems + 1U ); traceRETURN_vListInsertEnd(); } @@ -205,7 +205,7 @@ void vListInsert( List_t * const pxList, * item later. */ pxNewListItem->pxContainer = pxList; - ( pxList->uxNumberOfItems ) += ( UBaseType_t ) 1U; + ( pxList->uxNumberOfItems ) = ( UBaseType_t ) ( pxList->uxNumberOfItems + 1U ); traceRETURN_vListInsert(); } @@ -237,7 +237,7 @@ UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove ) } pxItemToRemove->pxContainer = NULL; - ( pxList->uxNumberOfItems ) -= ( UBaseType_t ) 1U; + ( pxList->uxNumberOfItems ) = ( UBaseType_t ) ( pxList->uxNumberOfItems - 1U ); traceRETURN_uxListRemove( pxList->uxNumberOfItems );