[PATCH] acpi: rasf: move scope of index variable 'i'
Colin King
colin.king at canonical.com
Tue Jan 23 12:29:44 UTC 2018
From: Colin Ian King <colin.king at canonical.com>
The scope of variable i can be moved to a deeper scope, cleans up
cppcheck style warning.
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
src/acpi/rasf/rasf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/acpi/rasf/rasf.c b/src/acpi/rasf/rasf.c
index f28ed642..aaa77396 100644
--- a/src/acpi/rasf/rasf.c
+++ b/src/acpi/rasf/rasf.c
@@ -46,10 +46,11 @@ static int rasf_test1(fwts_framework *fw)
{
fwts_acpi_table_rasf *rasf = (fwts_acpi_table_rasf *) table->data;
bool passed = true;
- uint8_t i;
fwts_log_info_verbatim(fw, "RASF (RAS Feature) Table:");
if (rasf->header.length == sizeof(fwts_acpi_table_rasf)) {
+ uint8_t i;
+
for (i = 0; i < 12; i++)
fwts_log_info_verbatim(fw, " Channel Identifier [%2.2" PRId8 "]: 0x%2.2" PRIx8, i, rasf->platform_cc_id[i]);
} else {
--
2.15.1
More information about the fwts-devel
mailing list