[PATCH] acpi: pmtt: fix incorrect assignment on passed

Colin King colin.king at canonical.com
Wed Aug 17 09:11:01 UTC 2016


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

Ensure we assign *passed rather than passed, fixes error found with
cppcheck:

[src/acpi/pmtt/pmtt.c:134]: (error) Boolean value assigned to pointer.

Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
 src/acpi/pmtt/pmtt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/acpi/pmtt/pmtt.c b/src/acpi/pmtt/pmtt.c
index ce1a752..18cb45c 100644
--- a/src/acpi/pmtt/pmtt.c
+++ b/src/acpi/pmtt/pmtt.c
@@ -131,7 +131,7 @@ static void pmmt_controller_test(fwts_framework *fw, fwts_acpi_table_pmtt_contro
 
 	offset = sizeof(fwts_acpi_table_pmtt_controller);
 	if (entry->header.length < offset + sizeof(fwts_acpi_table_pmtt_domain) * entry->domain_count) {
-		passed = false;
+		*passed = false;
 		fwts_failed(fw, LOG_LEVEL_HIGH,
 			"PMTTOutOfBound",
 			"PMTT's length is too small to contain all fields");
-- 
2.9.3




More information about the fwts-devel mailing list