[PATCH 10/46] acpi: pcc: reduce scope of variables

Colin King colin.king at canonical.com
Tue Jan 13 19:04:29 UTC 2015


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

cppcheck is picking up some minor style issues which can
be easily fixed:

[src/acpi/pcc/pcc.c:410]:
	(style) The scope of the variable 'item' can be reduced.

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

diff --git a/src/acpi/pcc/pcc.c b/src/acpi/pcc/pcc.c
index 0f01baa..94f9b9e 100644
--- a/src/acpi/pcc/pcc.c
+++ b/src/acpi/pcc/pcc.c
@@ -407,7 +407,6 @@ static int pcc_test1(fwts_framework *fw)
 {
 	ACPI_BUFFER       buf;
 	ACPI_STATUS	  ret;
-	fwts_list_link	*item;
 	fwts_list *pccs;
 	static char *name = "PCCH";
 	size_t name_len = strlen(name);
@@ -421,6 +420,8 @@ static int pcc_test1(fwts_framework *fw)
 	fwts_log_nl(fw);
 
 	if ((pccs = fwts_acpi_object_get_names()) != NULL) {
+		fwts_list_link	*item;
+
 		fwts_list_foreach(item, pccs) {
 			char *pcc_name = fwts_list_data(char*, item);
 			size_t len = strlen(pcc_name);
-- 
2.1.4




More information about the fwts-devel mailing list