summaryrefslogtreecommitdiff
path: root/cmds/idmap2/libidmap2/XmlParser.cpp
diff options
context:
space:
mode:
authorBernie Innocenti <codewiz@google.com>2020-12-19 15:31:52 +0900
committerBernie Innocenti <codewiz@google.com>2020-12-21 15:50:57 +0000
commit58cf8e3ffa23752f4e8e38cab4d89f9b44f9e57a (patch)
tree3cc4048865054e95a9bf72a5a50fe19c8e849c29 /cmds/idmap2/libidmap2/XmlParser.cpp
parent96db3dad2a4a1c4f1622a2b268b347cda0e808db (diff)
Add explicit Result::ok() checks where needed
Test: m checkbuild continuous_instrumentation_tests continuous_instrumentation_tests_api_coverage continuous_native_tests device-tests platform_tests Exempt-From-Owner-Approval: mechanical mass refactoring Change-Id: I3117833c51cdb333cccdfd159d1582f2adef77db
Diffstat (limited to 'cmds/idmap2/libidmap2/XmlParser.cpp')
-rw-r--r--cmds/idmap2/libidmap2/XmlParser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds/idmap2/libidmap2/XmlParser.cpp b/cmds/idmap2/libidmap2/XmlParser.cpp
index 7c55b64566f2..4030b83b3a41 100644
--- a/cmds/idmap2/libidmap2/XmlParser.cpp
+++ b/cmds/idmap2/libidmap2/XmlParser.cpp
@@ -98,7 +98,7 @@ Result<std::string> XmlParser::Node::GetAttributeStringValue(const std::string&
switch ((*value).dataType) {
case Res_value::TYPE_STRING: {
- if (auto str = parser_.getStrings().string8ObjectAt((*value).data)) {
+ if (auto str = parser_.getStrings().string8ObjectAt((*value).data); str.ok()) {
return std::string(str->string());
}
break;