Convert system/core to Result::ok()
No functionality changes, this is a mechanical cleanup.
Test: m
Test: cd system/core && atest
Change-Id: Ifdaa3ce1947ed578f656d5a446978726eb416c36
diff --git a/init/action_parser.cpp b/init/action_parser.cpp
index a8e1e09..f316871 100644
--- a/init/action_parser.cpp
+++ b/init/action_parser.cpp
@@ -110,14 +110,14 @@
if (!args[i].compare(0, prop_str.length(), prop_str)) {
if (auto result = ParsePropertyTrigger(args[i], subcontext, property_triggers);
- !result) {
+ !result.ok()) {
return result;
}
} else {
if (!event_trigger->empty()) {
return Error() << "multiple event triggers are not allowed";
}
- if (auto result = ValidateEventTrigger(args[i]); !result) {
+ if (auto result = ValidateEventTrigger(args[i]); !result.ok()) {
return result;
}
@@ -145,8 +145,9 @@
std::string event_trigger;
std::map<std::string, std::string> property_triggers;
- if (auto result = ParseTriggers(triggers, action_subcontext, &event_trigger, &property_triggers);
- !result) {
+ if (auto result =
+ ParseTriggers(triggers, action_subcontext, &event_trigger, &property_triggers);
+ !result.ok()) {
return Error() << "ParseTriggers() failed: " << result.error();
}