[PATCH] acpi: battery: Fix nesting bug
Colin King
colin.king at canonical.com
Tue May 7 08:10:03 UTC 2013
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
More information about the fwts-devel
mailing list