Merge "healthd: Fix incorrect return check"

This commit is contained in:
Treehugger Robot 2019-11-07 21:18:59 +00:00 committed by Gerrit Code Review
commit ec56c59dbb
1 changed files with 1 additions and 1 deletions

View File

@ -181,7 +181,7 @@ BatteryMonitor::PowerSupplyType BatteryMonitor::readPowerSupplyType(const String
return ANDROID_POWER_SUPPLY_TYPE_UNKNOWN;
auto ret = mapSysfsString(buf.c_str(), supplyTypeMap);
if (ret < 0) {
if (!ret) {
KLOG_WARNING(LOG_TAG, "Unknown power supply type '%s'\n", buf.c_str());
*ret = ANDROID_POWER_SUPPLY_TYPE_UNKNOWN;
}