ACK: [PATCH] acpi: madt: move scope of boolean 'passed'

Alex Hung alex.hung at canonical.com
Wed Jan 24 03:41:17 UTC 2018


On 2018-01-23 04:26 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> The boolean variable passed can be moved to a deeper scope. Cleans
> up a cppcheck style warning.
> 
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   src/acpi/madt/madt.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/acpi/madt/madt.c b/src/acpi/madt/madt.c
> index c97d9c53..883d5847 100644
> --- a/src/acpi/madt/madt.c
> +++ b/src/acpi/madt/madt.c
> @@ -1445,7 +1445,6 @@ static int madt_subtables(fwts_framework *fw)
>   	while (length > (ssize_t)sizeof(fwts_acpi_madt_sub_table_header)) {
>   		ssize_t skip = 0;
>   		int len = 0;
> -		bool passed = true;
>   		int type;
>   		int offset = 0;
>   
> @@ -1487,6 +1486,8 @@ static int madt_subtables(fwts_framework *fw)
>   		}
>   
>   		if (!(fw->flags & FWTS_FLAG_TEST_SBBR)) {
> +			bool passed = true;
> +
>   			/* verify that the length is what we expect */
>   			if (len == SUBTABLE_VARIABLE) {
>   				if (hdr->type == FWTS_ACPI_MADT_LOCAL_SAPIC) {
> 


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



More information about the fwts-devel mailing list