From patchwork Tue Aug 14 11:24:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 957446 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41qVcZ3X5sz9sBj; Tue, 14 Aug 2018 21:24:46 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1fpXRK-0007o8-Lg; Tue, 14 Aug 2018 11:24:42 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1fpXRI-0007l7-4r for fwts-devel@lists.ubuntu.com; Tue, 14 Aug 2018 11:24:40 +0000 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1fpXRH-0001yW-RL; Tue, 14 Aug 2018 11:24:39 +0000 From: Colin King To: fwts-devel@lists.ubuntu.com Subject: [PATCH 09/13] lib: fwts_list: some minor fwts coding style changes Date: Tue, 14 Aug 2018 12:24:31 +0100 Message-Id: <20180814112435.22166-10-colin.king@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180814112435.22166-1-colin.king@canonical.com> References: <20180814112435.22166-1-colin.king@canonical.com> MIME-Version: 1.0 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" From: Colin Ian King No functional change. Signed-off-by: Colin Ian King Acked-by: Alex Hung Acked-by: Ivan Hu --- src/lib/src/fwts_list.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/src/fwts_list.c b/src/lib/src/fwts_list.c index dd870e3a..8fd7ea04 100644 --- a/src/lib/src/fwts_list.c +++ b/src/lib/src/fwts_list.c @@ -85,7 +85,7 @@ fwts_list_link *fwts_list_append(fwts_list *list, void *data) if (!list) return NULL; - if ((link = calloc(1,sizeof(fwts_list_link))) == NULL) + if ((link = calloc(1, sizeof(fwts_list_link))) == NULL) return NULL; link->data = data; @@ -117,6 +117,7 @@ fwts_list_link *fwts_list_add_ordered(fwts_list *list, void *new_data, fwts_list for (list_item = &list->head; *list_item; list_item = &(*list_item)->next) { void *data = (void *)(*list_item)->data; + if (compare(data, new_data) >= 0) { new_list_item->next = (*list_item); break;