From patchwork Fri Dec 7 00:22:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: bios: mtrr: make skiperror a boolean From: Colin King X-Patchwork-Id: 204357 Message-Id: <1354839737-7231-1-git-send-email-colin.king@canonical.com> To: fwts-devel@lists.ubuntu.com Date: Fri, 7 Dec 2012 00:22:17 +0000 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",