libprocessgroup: Use uid_t consistently for UIDs
Found with -Wsign-conversion. Test: m Change-Id: I302ce3c2ffdd533fe45e98c5c7edbb442db46ae4
This commit is contained in:
parent
5ae7d86c64
commit
a757eb856e
4 changed files with 5 additions and 5 deletions
|
|
@ -95,7 +95,7 @@ bool getAttributePathForTask(const std::string& attr_name, int tid, std::string*
|
|||
|
||||
// Check if a profile can be applied without failing.
|
||||
// Returns true if it can be applied without failing, false otherwise
|
||||
bool isProfileValidForProcess(const std::string& profile_name, int uid, int pid);
|
||||
bool isProfileValidForProcess(const std::string& profile_name, uid_t uid, int pid);
|
||||
|
||||
#endif // __ANDROID_VNDK__
|
||||
|
||||
|
|
|
|||
|
|
@ -747,7 +747,7 @@ bool getAttributePathForTask(const std::string& attr_name, int tid, std::string*
|
|||
return CgroupGetAttributePathForTask(attr_name, tid, path);
|
||||
}
|
||||
|
||||
bool isProfileValidForProcess(const std::string& profile_name, int uid, int pid) {
|
||||
bool isProfileValidForProcess(const std::string& profile_name, uid_t uid, int pid) {
|
||||
const TaskProfile* tp = TaskProfiles::GetInstance().GetProfile(profile_name);
|
||||
|
||||
if (tp == nullptr) {
|
||||
|
|
|
|||
|
|
@ -489,7 +489,7 @@ WriteFileAction::WriteFileAction(const std::string& task_path, const std::string
|
|||
}
|
||||
|
||||
bool WriteFileAction::WriteValueToFile(const std::string& value_, ResourceCacheType cache_type,
|
||||
int uid, int pid, bool logfailures) const {
|
||||
uid_t uid, int pid, bool logfailures) const {
|
||||
std::string value(value_);
|
||||
|
||||
value = StringReplace(value, "<uid>", std::to_string(uid), true);
|
||||
|
|
|
|||
|
|
@ -184,8 +184,8 @@ class WriteFileAction : public ProfileAction {
|
|||
android::base::unique_fd fd_[ProfileAction::RCT_COUNT];
|
||||
mutable std::mutex fd_mutex_;
|
||||
|
||||
bool WriteValueToFile(const std::string& value, ResourceCacheType cache_type, int uid, int pid,
|
||||
bool logfailures) const;
|
||||
bool WriteValueToFile(const std::string& value, ResourceCacheType cache_type, uid_t uid,
|
||||
int pid, bool logfailures) const;
|
||||
CacheUseResult UseCachedFd(ResourceCacheType cache_type, const std::string& value) const;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue