[PATCH] acpi: lid: Fix nesting bug

Keng-Yu Lin kengyu at canonical.com
Mon May 20 07:32:11 UTC 2013


On Tue, May 7, 2013 at 4:08 PM, Colin King <colin.king at canonical.com> wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Coverity CID #997282: Nesting level does not match indentation
>
> Nest correctly.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/acpi/lid/lid.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/acpi/lid/lid.c b/src/acpi/lid/lid.c
> index 9117fc8..65fdc8a 100644
> --- a/src/acpi/lid/lid.c
> +++ b/src/acpi/lid/lid.c
> @@ -146,7 +146,7 @@ static int lid_test_state(fwts_framework *fw, int button)
>                         "Did not detect any ACPI LID events while waiting for to LID %s.", state);
>                 fwts_tag_failed(fw, FWTS_TAG_ACPI_LID);
>                 fwts_tag_failed(fw, FWTS_TAG_ACPI_EVENT);
> -       } else
> +       } else {
>                 fwts_passed(fw, "Detected ACPI LID events while waiting for LID to %s.", state);
>                 if ((matching == 0) || (not_matching > 0)) {
>                         fwts_failed(fw, LOG_LEVEL_HIGH, "NoLidState",
> @@ -154,6 +154,7 @@ static int lid_test_state(fwts_framework *fw, int button)
>                         fwts_tag_failed(fw, FWTS_TAG_ACPI_LID);
>                 } else
>                         fwts_passed(fw, "Detected lid %s state.", state);
> +       }
>
>         return FWTS_OK;
>  }
> --
> 1.8.1.2
>
Acked-by: Keng-Yu Lin <kengyu at canonical.com>



More information about the fwts-devel mailing list