[PATCH] bios: mtrr: make is_prefetchable() return a bool type

Colin King colin.king at canonical.com
Fri Dec 7 00:18:54 UTC 2012


From: Colin Ian King <colin.king at canonical.com>

Make is_prefetchable() return a bool type.

Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
 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);
-- 
1.8.0




More information about the fwts-devel mailing list