From patchwork Fri Dec 7 00:18:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: bios: mtrr: make is_prefetchable() return a bool type X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 204356 Message-Id: <1354839534-7056-1-git-send-email-colin.king@canonical.com> To: fwts-devel@lists.ubuntu.com Date: Fri, 7 Dec 2012 00:18:54 +0000 From: Colin King List-Id: Firmware Test Suite Development From: Colin Ian King Make is_prefetchable() return a bool type. Signed-off-by: Colin Ian King Acked-by: Alex Hung Acked-by: Ivan Hu --- src/bios/mtrr/mtrr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bios/mtrr/mtrr.c b/src/bios/mtrr/mtrr.c index 8bb4b0f..eb8fbbf 100644 --- a/src/bios/mtrr/mtrr.c +++ b/src/bios/mtrr/mtrr.c @@ -193,9 +193,9 @@ restart: return type; } -static int is_prefetchable(fwts_framework *fw, char *device, uint64_t address) +static bool is_prefetchable(fwts_framework *fw, char *device, uint64_t address) { - int pref = 0; + bool pref = false; char line[4096]; fwts_list *lspci_output; fwts_list_link *item; @@ -211,11 +211,11 @@ static int is_prefetchable(fwts_framework *fw, char *device, uint64_t address) char *str = strstr(fwts_text_list_text(item), "Memory at "); if (str && strtoull(str+10, NULL, 16) == address) { if (strstr(str, "non-prefetchable")) - pref = 0; + pref = false; else if (strstr(str, "(prefetchable")) - pref = 1; + pref = true; else if (strstr(str, ", prefetchable")) - pref = 1; + pref = true; } } fwts_list_free(lspci_output, free);