From: richardbarry Date: Tue, 25 Jun 2013 13:25:08 +0000 (+0000) Subject: Slight correction to coding standard in heap_2.c and heap_4.c. X-Git-Tag: V7.5.0~42 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8267d1a1ed6168cde695f66a46f2d36c47c21799;p=freertos Slight correction to coding standard in heap_2.c and heap_4.c. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1948 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/FreeRTOS/Source/portable/MemMang/heap_2.c b/FreeRTOS/Source/portable/MemMang/heap_2.c index 06eb5fbfb..6317f2024 100644 --- a/FreeRTOS/Source/portable/MemMang/heap_2.c +++ b/FreeRTOS/Source/portable/MemMang/heap_2.c @@ -174,7 +174,7 @@ void *pvReturn = NULL; xWantedSize += heapSTRUCT_SIZE; /* Ensure that blocks are always aligned to the required number of bytes. */ - if( xWantedSize & portBYTE_ALIGNMENT_MASK ) + if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0 ) { /* Byte alignment required. */ xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) ); diff --git a/FreeRTOS/Source/portable/MemMang/heap_4.c b/FreeRTOS/Source/portable/MemMang/heap_4.c index 2babb203f..b40229fb1 100644 --- a/FreeRTOS/Source/portable/MemMang/heap_4.c +++ b/FreeRTOS/Source/portable/MemMang/heap_4.c @@ -167,7 +167,7 @@ void *pvReturn = NULL; /* Ensure that blocks are always aligned to the required number of bytes. */ - if( xWantedSize & portBYTE_ALIGNMENT_MASK ) + if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0x00 ) { /* Byte alignment required. */ xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) );