Message ID | 20210330110100.1061146-1-colin.king@canonical.com |
---|---|
State | Accepted |
Headers | show |
Series | [V2] acpi: method: remove redundant continue statements | expand |
On 2021-03-30 5:01 a.m., 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> > --- > > V2: Fix two more of these issues > > --- > src/acpi/method/method.c | 12 +++--------- > 1 file changed, 3 insertions(+), 9 deletions(-) > > diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c > index f5253de9..763c3252 100644 > --- a/src/acpi/method/method.c > +++ b/src/acpi/method/method.c > @@ -3620,10 +3620,8 @@ static void method_test_FPS_return( > elements_ok = false; > } > > - if (!elements_ok) { > + if (!elements_ok) > failed = true; > - continue; > - } > } > > if (!failed) > @@ -3821,10 +3819,8 @@ static void method_test_ART_return( > > } > > - if (!elements_ok) { > + if (!elements_ok) > failed = true; > - continue; > - } > } > > if (!failed) > @@ -3884,10 +3880,8 @@ static void method_test_TRT_return( > elements_ok = false; > } > > - if (!elements_ok) { > + if (!elements_ok) > failed = true; > - continue; > - } > } > > if (!failed) > Acked-by: Alex Hung <alex.hung@canonical.com>
On 3/30/21 7:01 PM, 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> > --- > > V2: Fix two more of these issues > > --- > src/acpi/method/method.c | 12 +++--------- > 1 file changed, 3 insertions(+), 9 deletions(-) > > diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c > index f5253de9..763c3252 100644 > --- a/src/acpi/method/method.c > +++ b/src/acpi/method/method.c > @@ -3620,10 +3620,8 @@ static void method_test_FPS_return( > elements_ok = false; > } > > - if (!elements_ok) { > + if (!elements_ok) > failed = true; > - continue; > - } > } > > if (!failed) > @@ -3821,10 +3819,8 @@ static void method_test_ART_return( > > } > > - if (!elements_ok) { > + if (!elements_ok) > failed = true; > - continue; > - } > } > > if (!failed) > @@ -3884,10 +3880,8 @@ static void method_test_TRT_return( > elements_ok = false; > } > > - if (!elements_ok) { > + if (!elements_ok) > failed = true; > - continue; > - } > } > > if (!failed) Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c index f5253de9..763c3252 100644 --- a/src/acpi/method/method.c +++ b/src/acpi/method/method.c @@ -3620,10 +3620,8 @@ static void method_test_FPS_return( elements_ok = false; } - if (!elements_ok) { + if (!elements_ok) failed = true; - continue; - } } if (!failed) @@ -3821,10 +3819,8 @@ static void method_test_ART_return( } - if (!elements_ok) { + if (!elements_ok) failed = true; - continue; - } } if (!failed) @@ -3884,10 +3880,8 @@ static void method_test_TRT_return( elements_ok = false; } - if (!elements_ok) { + if (!elements_ok) failed = true; - continue; - } } if (!failed)