Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 25b2a8de authored by Bart Van Assche's avatar Bart Van Assche
Browse files

healthd: Improve readability of BatteryMonitor::init()



Declare and assign in a single statement instead of in two separate
statements. This patch does not change any functionality.

Test: Compile-tested only.
Change-Id: I0798cc940f5f2ca329548568ab68e96891521dd8
Signed-off-by: default avatarBart Van Assche <bvanassche@google.com>
parent 242ed1bb
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -608,13 +608,13 @@ void BatteryMonitor::init(struct healthd_config *hc) {

        while ((entry = readdir(dir.get()))) {
            const char* name = entry->d_name;
            std::vector<String8>::iterator itIgnoreName;

            if (!strcmp(name, ".") || !strcmp(name, ".."))
                continue;

            itIgnoreName = find(hc->ignorePowerSupplyNames.begin(),
                                hc->ignorePowerSupplyNames.end(), String8(name));
            std::vector<String8>::iterator itIgnoreName =
                    find(hc->ignorePowerSupplyNames.begin(), hc->ignorePowerSupplyNames.end(),
                         String8(name));
            if (itIgnoreName != hc->ignorePowerSupplyNames.end())
                continue;