From patchwork Fri Dec 7 00:16:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: bios: mtrr: make the failed flag a boolean Date: Thu, 06 Dec 2012 14:16:07 -0000 From: Colin King X-Patchwork-Id: 204354 Message-Id: <1354839367-6865-1-git-send-email-colin.king@canonical.com> To: fwts-devel@lists.ubuntu.com From: Colin Ian King Make the failed flag a boolean. Signed-off-by: Colin Ian King Acked-by: Alex Hung Acked-by: Ivan Hu --- src/bios/mtrr/mtrr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/bios/mtrr/mtrr.c b/src/bios/mtrr/mtrr.c index e2ee506..8bb4b0f 100644 --- a/src/bios/mtrr/mtrr.c +++ b/src/bios/mtrr/mtrr.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -420,22 +421,22 @@ static int mtrr_test1(fwts_framework *fw) static int mtrr_test2(fwts_framework *fw) { if (klog != NULL) { - int failed = 0; + bool failed = false; if (fwts_klog_regex_find(fw, klog, "mtrr: your CPUs had inconsistent fixed MTRR settings") > 0) { fwts_log_info(fw, "Detected CPUs with inconsistent fixed MTRR settings which the kernel fixed."); fwts_tag_failed(fw, FWTS_TAG_BIOS); - failed = 1; + failed = true; } if (fwts_klog_regex_find(fw, klog, "mtrr: your CPUs had inconsistent variable MTRR settings") > 0) { fwts_log_info(fw, "Detected CPUs with inconsistent variable MTRR settings which the kernel fixed."); fwts_tag_failed(fw, FWTS_TAG_BIOS); - failed = 1; + failed = true; } if (fwts_klog_regex_find(fw, klog, "mtrr: your CPUs had inconsistent MTRRdefType") > 0) { fwts_log_info(fw, "Detected CPUs with inconsistent variable MTRR settings which the kernel fixed."); fwts_tag_failed(fw, FWTS_TAG_BIOS); - failed = 1; + failed = true; } if (failed)