diff mbox series

acpi: method: remove redundant continue statement

Message ID 20210330105431.1060642-1-colin.king@canonical.com
State Superseded
Headers show
Series acpi: method: remove redundant continue statement | expand

Commit Message

Colin Ian King March 30, 2021, 10:54 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

The continue statement at the end of a for-loop is redundant. Remove
it to silence pedantic static analysis warnings.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/acpi/method/method.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Colin Ian King March 30, 2021, 11 a.m. UTC | #1
On 30/03/2021 11:54, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The continue statement at the end of a for-loop is redundant. Remove
> it to silence pedantic static analysis warnings.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/acpi/method/method.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index f5253de9..0cbb3982 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -3884,10 +3884,8 @@ static void method_test_TRT_return(
>  				elements_ok = false;
>  		}
>  
> -		if (!elements_ok) {
> +		if (!elements_ok)
>  			failed = true;
> -			continue;
> -		}
>  	}
>  
>  	if (!failed)
> 

There are a couple more of these, i'll send a V2.
diff mbox series

Patch

diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
index f5253de9..0cbb3982 100644
--- a/src/acpi/method/method.c
+++ b/src/acpi/method/method.c
@@ -3884,10 +3884,8 @@  static void method_test_TRT_return(
 				elements_ok = false;
 		}
 
-		if (!elements_ok) {
+		if (!elements_ok)
 			failed = true;
-			continue;
-		}
 	}
 
 	if (!failed)