ACK: [PATCH] acpi: method: reduce scope of boolean flag matching_levels

ivanhu ivan.hu at canonical.com
Wed Jun 12 03:41:37 UTC 2019


On 6/11/19 5:09 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Clean up a cppcheck style check.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/acpi/method/method.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index d1f20bb2..eeb9c7fa 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -5739,7 +5739,6 @@ static void method_test_BCL_return(
>  	uint32_t i;
>  	bool failed = false;
>  	bool ascending_levels = false;
> -	bool matching_levels;
>  	char *str = NULL;
>  
>  	FWTS_UNUSED(private);
> @@ -5812,7 +5811,8 @@ static void method_test_BCL_return(
>  	}
>  
>  	if (!access("/sys/class/backlight/acpi_video0", R_OK)) {
> -		matching_levels = false;
> +		bool matching_levels = false;
> +
>  		for (i = 2; i < obj->Package.Count; i++) {
>  			if (obj->Package.Elements[0].Integer.Value ==
>  			    obj->Package.Elements[i].Integer.Value) {


Acked-by: Ivan Hu <ivan.hu at canonical.com>


-------------- 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/20190612/e7aec92e/attachment.sig>


More information about the fwts-devel mailing list