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

Commit 0310ec4b authored by Krzysztof Kosiński's avatar Krzysztof Kosiński
Browse files

Fix invalid uses of PLOG.

PLOG reports the value of errno. These four PLOG statements are
after functions that are not syscalls, leading to confusing logs
such as "Failed to apply Foo task profile: Success".

Bug: 271196526
Test: N/A
Change-Id: Iede5274d1ceebabec8432527112291ba63dca090
parent 2a2760fe
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -815,11 +815,11 @@ bool TaskProfiles::SetProcessProfiles(uid_t uid, pid_t pid, std::span<const T> p
                profile->EnableResourceCaching(ProfileAction::RCT_PROCESS);
            }
            if (!profile->ExecuteForProcess(uid, pid)) {
                PLOG(WARNING) << "Failed to apply " << name << " process profile";
                LOG(WARNING) << "Failed to apply " << name << " process profile";
                success = false;
            }
        } else {
            PLOG(WARNING) << "Failed to find " << name << " process profile";
            LOG(WARNING) << "Failed to find " << name << " process profile";
            success = false;
        }
    }
@@ -836,11 +836,11 @@ bool TaskProfiles::SetTaskProfiles(int tid, std::span<const T> profiles, bool us
                profile->EnableResourceCaching(ProfileAction::RCT_TASK);
            }
            if (!profile->ExecuteForTask(tid)) {
                PLOG(WARNING) << "Failed to apply " << name << " task profile";
                LOG(WARNING) << "Failed to apply " << name << " task profile";
                success = false;
            }
        } else {
            PLOG(WARNING) << "Failed to find " << name << " task profile";
            LOG(WARNING) << "Failed to find " << name << " task profile";
            success = false;
        }
    }