From patchwork Tue Jan 13 19:04:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 428619 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id B82EB1401EB; Wed, 14 Jan 2015 06:08:32 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1YB6pL-0002Mn-Ig; Tue, 13 Jan 2015 19:08:31 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1YB6nC-0001vj-9Z for fwts-devel@lists.ubuntu.com; Tue, 13 Jan 2015 19:06:18 +0000 Received: from cpc3-craw6-2-0-cust180.croy.cable.virginm.net ([77.100.248.181] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1YB6nC-0004Ho-6n for fwts-devel@lists.ubuntu.com; Tue, 13 Jan 2015 19:06:18 +0000 From: Colin King To: fwts-devel@lists.ubuntu.com Subject: [PATCH 33/46] lib: fwts_memorymap: fix typo on memory comparison sort Date: Tue, 13 Jan 2015 19:04:52 +0000 Message-Id: <1421175905-17035-34-git-send-email-colin.king@canonical.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1421175905-17035-1-git-send-email-colin.king@canonical.com> References: <1421175905-17035-1-git-send-email-colin.king@canonical.com> X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: fwts-devel-bounces@lists.ubuntu.com From: Colin Ian King 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 Acked-by: Ivan Hu Acked-by: Alex Hung --- 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;