libprocessgroup: Combine all 3 ActivateControllers implementations into one
Remove this code duplication and use just one interface.
Bug: 349105928
Change-Id: Id8c7186d9665e9087a654f5781b7593b06349160
diff --git a/libprocessgroup/processgroup.cpp b/libprocessgroup/processgroup.cpp
index 83a2258..d3719ee 100644
--- a/libprocessgroup/processgroup.cpp
+++ b/libprocessgroup/processgroup.cpp
@@ -662,10 +662,9 @@
return -errno;
}
if (activate_controllers) {
- ret = CgroupMap::GetInstance().ActivateControllers(uid_path);
- if (ret) {
- LOG(ERROR) << "Failed to activate controllers in " << uid_path;
- return ret;
+ if (!CgroupMap::GetInstance().ActivateControllers(uid_path)) {
+ PLOG(ERROR) << "Failed to activate controllers in " << uid_path;
+ return -errno;
}
}