Small bugfix in low-battery notification (charge_state_v2.c)

I used '&&' instead of '&' for bitfield operations. Hooray for test coverage!

BUG=chrome-os-partner:20881
BRANCH=ToT
TEST=make buildall -j

Change-Id: I7e6343df4aead456d4984bf77667aa5cf852aa15
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/193735
Reviewed-by: Alec Berg <alecaberg@chromium.org>
This commit is contained in:
Bill Richardson
2014-04-08 17:40:07 -07:00
parent 4da9520386
commit 3505d8972c

View File

@@ -385,7 +385,7 @@ static void prevent_deep_discharge(void)
static void notify_host_of_low_battery(void)
{
/* We can't tell what the current charge is. Assume it's okay. */
if (curr.batt.flags && BATT_FLAG_BAD_STATE_OF_CHARGE)
if (curr.batt.flags & BATT_FLAG_BAD_STATE_OF_CHARGE)
return;
if (curr.batt.state_of_charge <= BATTERY_LEVEL_LOW &&