From patchwork Fri Dec 7 00:22:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 204357 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id A1D262C00A6 for ; Fri, 7 Dec 2012 11:22:20 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Tglhr-0003Ko-G5; Fri, 07 Dec 2012 00:22:19 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Tglhp-0003Kf-S0 for fwts-devel@lists.ubuntu.com; Fri, 07 Dec 2012 00:22:17 +0000 Received: from cpc3-craw6-2-0-cust180.croy.cable.virginmedia.com ([77.100.248.181] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1Tglhp-0001Fy-ND for fwts-devel@lists.ubuntu.com; Fri, 07 Dec 2012 00:22:17 +0000 From: Colin King To: fwts-devel@lists.ubuntu.com Subject: [PATCH] bios: mtrr: make skiperror a boolean Date: Fri, 7 Dec 2012 00:22:17 +0000 Message-Id: <1354839737-7231-1-git-send-email-colin.king@canonical.com> X-Mailer: git-send-email 1.8.0 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: fwts-devel-bounces@lists.ubuntu.com Errors-To: fwts-devel-bounces@lists.ubuntu.com From: Colin Ian King Make skiperror a bool type. Signed-off-by: Colin Ian King Acked-by: Alex Hung Acked-by: Ivan Hu --- src/bios/mtrr/mtrr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bios/mtrr/mtrr.c b/src/bios/mtrr/mtrr.c index eb8fbbf..6dbc8e2 100644 --- a/src/bios/mtrr/mtrr.c +++ b/src/bios/mtrr/mtrr.c @@ -263,7 +263,7 @@ static int validate_iomem(fwts_framework *fw) int type, type_must, type_mustnot; char *c, *c2; int i; - int skiperror = 0; + bool skiperror = false; if (fgets(buffer, 4095, file)==NULL) break; @@ -321,14 +321,14 @@ static int validate_iomem(fwts_framework *fw) c2, cache_to_string(type & type_mustnot)); fwts_tag_failed(fw, FWTS_TAG_BIOS); if (type_must == UNCACHED) - skiperror = 1; + skiperror = true; } if (type & DEFAULT) { type |= UNCACHED; type &= ~DEFAULT; } - if ((type & type_must)!=type_must && skiperror==0) { + if (((type & type_must) != type_must) && !skiperror) { failed++; fwts_failed(fw, LOG_LEVEL_MEDIUM, "MTRRLackingAttr",