From efa9286d6f5928262b3bbb8be784c1170ecf80a0 Mon Sep 17 00:00:00 2001 From: bradleysmith23 Date: Tue, 6 Feb 2024 16:16:07 -0800 Subject: [PATCH] Fix typo --- include/list.h | 2 +- list.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/list.h b/include/list.h index 344f7afb3..b06c1fc90 100644 --- a/include/list.h +++ b/include/list.h @@ -357,7 +357,7 @@ typedef struct xLIST #define listINSERT_END( pxList, pxNewListItem ) \ do { \ ListItem_t * const pxIndex = ( pxList )->pxIndex; \ - UBaseType_t uxNumberOfitems; \ + UBaseType_t uxNumberOfItems; \ \ /* Only effective when configASSERT() is also defined, these tests may catch \ * the list data structures being overwritten in memory. They will not catch \ diff --git a/list.c b/list.c index 312820b47..f1120259d 100644 --- a/list.c +++ b/list.c @@ -106,6 +106,7 @@ void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem ) { ListItem_t * const pxIndex = pxList->pxIndex; + UBaseType_t uxNumberOfItems; traceENTER_vListInsertEnd( pxList, pxNewListItem ); @@ -130,7 +131,7 @@ void vListInsertEnd( List_t * const pxList, /* Remember which list the item is in. */ pxNewListItem->pxContainer = pxList; - UBaseType_t uxNumberOfItems = ( pxList->uxNumberOfItems ); + uxNumberOfItems = ( pxList->uxNumberOfItems ); uxNumberOfItems++; ( pxList->uxNumberOfItems ) = uxNumberOfItems; @@ -143,6 +144,7 @@ void vListInsert( List_t * const pxList, { ListItem_t * pxIterator; const TickType_t xValueOfInsertion = pxNewListItem->xItemValue; + UBaseType_t uxNumberOfItems; traceENTER_vListInsert( pxList, pxNewListItem ); @@ -207,7 +209,7 @@ void vListInsert( List_t * const pxList, * item later. */ pxNewListItem->pxContainer = pxList; - UBaseType_t uxNumberOfItems = ( pxList->uxNumberOfItems ); + uxNumberOfItems = ( pxList->uxNumberOfItems ); uxNumberOfItems++; ( pxList->uxNumberOfItems ) = uxNumberOfItems; @@ -220,6 +222,7 @@ UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove ) /* The list item knows which list it is in. Obtain the list from the list * item. */ List_t * const pxList = pxItemToRemove->pxContainer; + UBaseType_t uxNumberOfItems; traceENTER_uxListRemove( pxItemToRemove ); @@ -242,7 +245,7 @@ UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove ) } pxItemToRemove->pxContainer = NULL; - UBaseType_t uxNumberOfItems = ( pxList->uxNumberOfItems ); + uxNumberOfItems = ( pxList->uxNumberOfItems ); uxNumberOfItems--; ( pxList->uxNumberOfItems ) = uxNumberOfItems;