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

ivanhu ivan.hu at canonical.com
Tue Feb 6 03:00:39 UTC 2018



On 01/31/2018 06:07 PM, 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: Ivan Hu <ivan.hu at canonical.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/fwts-devel/attachments/20180206/35514279/attachment-0001.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/35514279/attachment-0001.sig>


More information about the fwts-devel mailing list