[PATCH 32/46] lib: fwts_gpe: reduce scope of variables

Colin King colin.king at canonical.com
Tue Jan 13 19:04:51 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/lib/src/fwts_gpe.c:35]:
	(style) The scope of the variable 'i' can be reduced.

Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
 src/lib/src/fwts_gpe.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/src/fwts_gpe.c b/src/lib/src/fwts_gpe.c
index a78c0d8..6ef759f 100644
--- a/src/lib/src/fwts_gpe.c
+++ b/src/lib/src/fwts_gpe.c
@@ -32,10 +32,10 @@
  */
 void fwts_gpe_free(fwts_gpe *gpe, const int count)
 {
-	int i;
-
 	if (gpe) {
-		for (i=0;i<count;i++) {
+		int i;
+
+		for (i = 0; i < count; i++) {
 			if (gpe[i].name)
 				free(gpe[i].name);
 		}
-- 
2.1.4




More information about the fwts-devel mailing list