From 5c5ed9c85604bb48af17cc5443ed744f4c855091 Mon Sep 17 00:00:00 2001 From: Greg Kaiser Date: Mon, 4 Feb 2019 06:33:26 -0800 Subject: [PATCH] libprocessgroup: Fix return values We want our default implementations to fail, but '-1' is implicitly cast to 'true', since it's non-zero. We explicitly use 'false' to fix this. Test: TreeHugger Change-Id: I369897b519601ce1a887cf6acd5f2cb9a6113a9a --- libprocessgroup/task_profiles.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libprocessgroup/task_profiles.h b/libprocessgroup/task_profiles.h index 886ead141..83e74b20b 100644 --- a/libprocessgroup/task_profiles.h +++ b/libprocessgroup/task_profiles.h @@ -46,8 +46,8 @@ class ProfileAction { virtual ~ProfileAction() {} // Default implementations will fail - virtual bool ExecuteForProcess(uid_t, pid_t) const { return -1; }; - virtual bool ExecuteForTask(int) const { return -1; }; + virtual bool ExecuteForProcess(uid_t, pid_t) const { return false; }; + virtual bool ExecuteForTask(int) const { return false; }; }; // Profile actions