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

ivanhu ivan.hu at canonical.com
Fri Apr 21 02:33:46 UTC 2017


On 04/13/2017 05:50 PM, 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: Ivan Hu <ivan.hu at canonical.com>



More information about the fwts-devel mailing list