aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorNate Lawson <njl@FreeBSD.org>2005-08-11 17:12:57 +0000
committerNate Lawson <njl@FreeBSD.org>2005-08-11 17:12:57 +0000
commit84cdcfb36f432f075cffe28bf51b2f79899ccad0 (patch)
treeff70c139a79f70d274fb80fed9528c975fbb03f4 /sys
parent199c7836bcfa8c68c3116492594df9d4bb756246 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/acpica/acpi_battery.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/acpica/acpi_battery.c b/sys/dev/acpica/acpi_battery.c
index 4099468cf9b7..218e4d9a68f2 100644
--- a/sys/dev/acpica/acpi_battery.c
+++ b/sys/dev/acpica/acpi_battery.c
@@ -227,9 +227,8 @@ acpi_battery_get_battinfo(device_t dev, struct acpi_battinfo *battinfo)
total_min += bi[i].min;
/* If this battery is not present, don't use its capacity. */
- if (bi[i].cap == -1)
- bi[i].cap = 0;
- total_cap += bi[i].cap;
+ if (bi[i].cap != -1)
+ total_cap += bi[i].cap;
}
/*