[PATCH 3/9] lib: fwts_framework: remove dead store to len in for loop

Colin King colin.king at canonical.com
Wed Dec 16 00:51:39 UTC 2015


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

Static analysis by clan scan-build detected a dead assignment to
len in a for loop that can be removed.

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

diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
index 808e211..2efb543 100644
--- a/src/lib/src/fwts_framework.c
+++ b/src/lib/src/fwts_framework.c
@@ -932,7 +932,7 @@ static void fwts_framework_heading_info(
 		len += strlen(argv[i]) + 1;
 
 	if ((args = calloc(len, 1)) != NULL) {
-		for (len = 1, i = 1; i < argc; i++) {
+		for (i = 1; i < argc; i++) {
 			strcat(args, " ");
 			strcat(args, argv[i]);
 		}
-- 
2.6.4




More information about the fwts-devel mailing list