[PATCH] acpi: battery: Fix nesting bug
Keng-Yu Lin
kengyu at canonical.com
Mon May 20 07:32:35 UTC 2013
On Tue, May 7, 2013 at 4:10 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/battery/battery.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/acpi/battery/battery.c b/src/acpi/battery/battery.c
> index f83f086..8f58491 100644
> --- a/src/acpi/battery/battery.c
> +++ b/src/acpi/battery/battery.c
> @@ -114,7 +114,7 @@ static int wait_for_acpi_event(fwts_framework *fw, char *name)
> if (events == 0)
> fwts_failed(fw, LOG_LEVEL_HIGH, "BatteryNoEvents",
> "Did not detect any ACPI battery events.");
> - else
> + else {
> fwts_passed(fw, "Detected ACPI battery events.");
> if (matching == 0)
> fwts_failed(fw, LOG_LEVEL_HIGH, "BatteryNoEvents",
> @@ -122,6 +122,7 @@ static int wait_for_acpi_event(fwts_framework *fw, char *name)
> else
> fwts_passed(fw, "Detected ACPI event for battery %s.",
> name);
> + }
>
> return FWTS_OK;
> }
> --
> 1.8.1.2
>
Acked-by: Keng-Yu Lin <kengyu at canonical.com>
More information about the fwts-devel
mailing list