Skip to content

Commit 386c1bc

Browse files
authored
Change the macro from portMAX_DELAY to SIZE_MAX in order to initialize size_t-type variable correctly (#1310)
1 parent 4394741 commit 386c1bc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

portable/MemMang/heap_4.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ static void prvInsertBlockIntoFreeList( BlockLink_t * pxBlockToInsert ) /* PRIVI
572572
void vPortGetHeapStats( HeapStats_t * pxHeapStats )
573573
{
574574
BlockLink_t * pxBlock;
575-
size_t xBlocks = 0, xMaxSize = 0, xMinSize = portMAX_DELAY; /* portMAX_DELAY used as a portable way of getting the maximum value. */
575+
size_t xBlocks = 0, xMaxSize = 0, xMinSize = SIZE_MAX;
576576

577577
vTaskSuspendAll();
578578
{

portable/MemMang/heap_5.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ void vPortDefineHeapRegions( const HeapRegion_t * const pxHeapRegions ) /* PRIVI
672672
void vPortGetHeapStats( HeapStats_t * pxHeapStats )
673673
{
674674
BlockLink_t * pxBlock;
675-
size_t xBlocks = 0, xMaxSize = 0, xMinSize = portMAX_DELAY; /* portMAX_DELAY used as a portable way of getting the maximum value. */
675+
size_t xBlocks = 0, xMaxSize = 0, xMinSize = SIZE_MAX;
676676

677677
vTaskSuspendAll();
678678
{

0 commit comments

Comments
 (0)