ACK: [PATCH 3/9] lib: fwts_framework: remove dead store to len in for loop
Alex Hung
alex.hung at canonical.com
Wed Dec 16 03:48:49 UTC 2015
On 2015-12-16 08:51 AM, 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: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list