ACK: [PATCH] lib: fwts_klog: reduce scope of variable 'old'

Alex Hung alex.hung at canonical.com
Wed Aug 17 09:59:21 UTC 2016


On 2016-08-17 05:51 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Minor change to fix cppcheck style warnings, no functional change
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/lib/src/fwts_klog.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/src/lib/src/fwts_klog.c b/src/lib/src/fwts_klog.c
> index 63918e7..5dbd4ed 100644
> --- a/src/lib/src/fwts_klog.c
> +++ b/src/lib/src/fwts_klog.c
> @@ -66,7 +66,6 @@ fwts_list *fwts_klog_find_changes(fwts_list *klog_old, fwts_list *klog_new)
>  		l_new = klog_new->head;
>  	} else {
>  		fwts_list_link *l_old_last = NULL;
> -		char *old;
>
>  		/* Clone just the new differences */
>
> @@ -76,7 +75,7 @@ fwts_list *fwts_klog_find_changes(fwts_list *klog_old, fwts_list *klog_new)
>
>  		if (l_old_last) {
>  			/* And now look for that last line in the new log */
> -			old = fwts_list_data(char *, l_old_last);
> +			char *old = fwts_list_data(char *, l_old_last);
>  			fwts_list_foreach(l_new, klog_new) {
>  				const char *new = fwts_list_data(char *, l_new);
>
>

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



More information about the fwts-devel mailing list