ACK: [PATCH] lib: fwts_summary: move statement into previous if block

Alex Hung alex.hung at canonical.com
Mon Apr 17 17:20:14 UTC 2017


On 2017-04-13 02:50 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> The previous if block also handles the !summary_item_found condition
> so move the statement into this if block.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/lib/src/fwts_summary.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/src/lib/src/fwts_summary.c b/src/lib/src/fwts_summary.c
> index 41008733..82339ec0 100644
> --- a/src/lib/src/fwts_summary.c
> +++ b/src/lib/src/fwts_summary.c
> @@ -163,11 +163,10 @@ int fwts_summary_add(
>  			return FWTS_ERROR;
>  		}
>  		fwts_chop_newline(summary_item->text);
> -	}
>
> -	/* And append new item if not done so already */
> -	if (!summary_item_found)
> +		/* And append new item if not done so already */
>  		fwts_list_append(fwts_summaries[index], summary_item);
> +	}
>
>  	return FWTS_OK;
>  }
>

Acked-by: Alex Hung <alex.hung at canonical.com>



More information about the fwts-devel mailing list