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

ivanhu ivan.hu at canonical.com
Tue Feb 6 03:01:58 UTC 2018



On 01/31/2018 06:14 PM, 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: Ivan Hu <ivan.hu at canonical.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/fwts-devel/attachments/20180206/9c88ccc7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/fwts-devel/attachments/20180206/9c88ccc7/attachment.sig>


More information about the fwts-devel mailing list