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

ivanhu ivan.hu at canonical.com
Wed Dec 16 06:26:08 UTC 2015



On 2015年12月16日 08:51, Colin King wrote:
> 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]);
>   		}
>

Acked-by: Ivan Hu <ivan.hu at canonical.com>



More information about the fwts-devel mailing list