[PATCH] acpi: bert: remove redundant variable 'length'

Colin King colin.king at canonical.com
Tue Nov 24 13:17:30 UTC 2015


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

Static analysis with cppcheck detected a variable that can be
removed.

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

diff --git a/src/acpi/bert/bert.c b/src/acpi/bert/bert.c
index 5f2d7ca..8ad6510 100644
--- a/src/acpi/bert/bert.c
+++ b/src/acpi/bert/bert.c
@@ -80,7 +80,6 @@ static int bert_test1(fwts_framework *fw)
 			bert->boot_error_region);
 	} else {
 		void *mapping;
-		uint32_t length = 0;
 
 		mapping = fwts_mmap(bert->boot_error_region, (size_t)bert->boot_error_region_length);
 		if (mapping == FWTS_MAP_FAILED) {
@@ -160,7 +159,7 @@ static int bert_test1(fwts_framework *fw)
 						" is larger than the remaining region size of %" PRIu32
 						" bytes",
 						region->raw_data_length,
-						bert->boot_error_region_length - length);
+						bert->boot_error_region_length);
 				passed = false;
 			}
 			fwts_munmap(mapping, (size_t)bert->boot_error_region_length);
-- 
2.6.2




More information about the fwts-devel mailing list