diff options
author | Bernie Innocenti <codewiz@google.com> | 2020-02-06 22:01:51 +0900 |
---|---|---|
committer | Bernie Innocenti <codewiz@google.com> | 2020-02-09 03:59:07 +0900 |
commit | d04d5d0790feac25d86c1031036da3787c4f0307 (patch) | |
tree | 4228455ad51823fa7324a8fb33029708f77ad213 /apexd/apex_preinstalled_data.cpp | |
parent | f2989addaf762b252d80eb2bc479fa3e649f8278 (diff) |
Convert system/apex to Result::ok()
No functionality changes, this is a mechanical cleanup.
Test: cd system/apexd && m
Change-Id: I479084b9d1101b86c2e8d7ed631feba3edcedd8e
Diffstat (limited to 'apexd/apex_preinstalled_data.cpp')
-rw-r--r-- | apexd/apex_preinstalled_data.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apexd/apex_preinstalled_data.cpp b/apexd/apex_preinstalled_data.cpp index 22c7e09..aeaec64 100644 --- a/apexd/apex_preinstalled_data.cpp +++ b/apexd/apex_preinstalled_data.cpp @@ -58,13 +58,13 @@ Result<std::vector<ApexPreinstalledData>> collectPreinstalleDataFromDir( return Error() << "Can't scan preinstalled APEX data from " << dir; } Result<std::vector<std::string>> apex_files = FindApexFilesByName(dir); - if (!apex_files) { + if (!apex_files.ok()) { return apex_files.error(); } for (const auto& file : *apex_files) { Result<ApexFile> apex_file = ApexFile::Open(file); - if (!apex_file) { + if (!apex_file.ok()) { return Error() << "Failed to open " << file << " : " << apex_file.error(); } ApexPreinstalledData apexPreInstalledData; @@ -100,12 +100,12 @@ Result<void> collectPreinstalledData(const std::vector<std::string>& dirs) { for (const auto& dir : dirs) { Result<std::vector<ApexPreinstalledData>> preinstalledData = collectPreinstalleDataFromDir(dir); - if (!preinstalledData) { + if (!preinstalledData.ok()) { return Error() << "Failed to collect keys from " << dir << " : " << preinstalledData.error(); } Result<void> st = updatePreinstalledData(*preinstalledData); - if (!st) { + if (!st.ok()) { return st; } } |