ACK: [PATCH] lib: fwts_log: remove redundant initialization of 'field'

Alex Hung alex.hung at canonical.com
Fri Feb 2 02:48:48 UTC 2018


On 2018-01-31 02:14 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> Variable field is being assigned twice, once at initialization and
> again in a for-loop. Remove the redundant first initialization.
> 
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   src/lib/src/fwts_log.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/lib/src/fwts_log.c b/src/lib/src/fwts_log.c
> index c699e4dc..32406f30 100644
> --- a/src/lib/src/fwts_log.c
> +++ b/src/lib/src/fwts_log.c
> @@ -201,7 +201,7 @@ char *fwts_log_level_to_str(const fwts_log_level level)
>    */
>   void fwts_log_print_fields(void)
>   {
> -	fwts_log_field field = 1;
> +	fwts_log_field field;
>   
>   	printf("Available fields: ");
>   	for (field = 1; ; field <<= 1) {
> 

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



More information about the fwts-devel mailing list