ACK: [PATCH] lib: fwts_log: remove redundant initialization of ptr1

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


On 2018-01-31 02:07 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> Pointer ptr1 is initialized to str and then again in a for-loop,
> hence the initialization is redundant and can be removed.
> 
> 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 beceb98b..c699e4dc 100644
> --- a/src/lib/src/fwts_log.c
> +++ b/src/lib/src/fwts_log.c
> @@ -139,7 +139,7 @@ char *fwts_log_field_to_str_full(const fwts_log_field field)
>   char *fwts_log_field_to_str_upper(const fwts_log_field field)
>   {
>   	static char str[16];
> -	char *ptr1 = str;
> +	char *ptr1;
>   	char *ptr2 = fwts_log_field_to_str_full(field);
>   
>   	for (ptr1 = str; *ptr2; ptr1++, ptr2++)
> 

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



More information about the fwts-devel mailing list