From 8267d1a1ed6168cde695f66a46f2d36c47c21799 Mon Sep 17 00:00:00 2001 From: richardbarry Date: Tue, 25 Jun 2013 13:25:08 +0000 Subject: [PATCH] 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 --- FreeRTOS/Source/portable/MemMang/heap_2.c | 2 +- FreeRTOS/Source/portable/MemMang/heap_4.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 ) ); -- 2.39.5