mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-07 16:11:43 +00:00
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:
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user