From 0310ec4b55a8675a0226a92b812e2fae73f6678e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Kosi=C5=84ski?= Date: Wed, 1 Mar 2023 04:17:57 +0000 Subject: [PATCH] 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 --- libprocessgroup/task_profiles.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libprocessgroup/task_profiles.cpp b/libprocessgroup/task_profiles.cpp index 35adf36b2..4db73727b 100644 --- a/libprocessgroup/task_profiles.cpp +++ b/libprocessgroup/task_profiles.cpp @@ -815,11 +815,11 @@ bool TaskProfiles::SetProcessProfiles(uid_t uid, pid_t pid, std::span 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 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; } }