ACK: [PATCH 33/46] lib: fwts_memorymap: fix typo on memory comparison sort

IvanHu ivan.hu at canonical.com
Thu Jan 15 07:36:53 UTC 2015


On 01/14/2015 03:04 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> cppcheck discovered a bug with the style check enabled:
>
> [src/lib/src/fwts_memorymap.c:43]: (style)
> 	Expression is always false because 'else if' condition
> 	matches previous condition at line 41.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   src/lib/src/fwts_memorymap.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/lib/src/fwts_memorymap.c b/src/lib/src/fwts_memorymap.c
> index 16f3041..8482a9d 100644
> --- a/src/lib/src/fwts_memorymap.c
> +++ b/src/lib/src/fwts_memorymap.c
> @@ -40,7 +40,7 @@ static int fwts_fwts_memory_map_entry_compare(void *data1, void *data2)
>
>   	if (entry1->start_address < entry2->start_address)
>   		return -1;
> -	else if (entry1->start_address < entry2->start_address)
> +	else if (entry1->start_address > entry2->start_address)
>   		return 1;
>   	else
>   		return 0;
>

Acked-by: Ivan Hu <ivan.hu at canonical.com>



More information about the fwts-devel mailing list