summaryrefslogtreecommitdiffstats
path: root/edify/edify_parser.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-10-18 02:15:29 +0200
committerandroid-build-merger <android-build-merger@google.com>2016-10-18 02:15:29 +0200
commit430b7ae4699eb3685dcc0f7c736a9aebd76829a8 (patch)
treee237b84e2e6f4cd6a562f88ab3e491eca8767e9f /edify/edify_parser.cpp
parentMerge "init: move healthd to late-init" (diff)
parentMerge "Change StringValue to use std::string" (diff)
downloadandroid_bootable_recovery-430b7ae4699eb3685dcc0f7c736a9aebd76829a8.tar
android_bootable_recovery-430b7ae4699eb3685dcc0f7c736a9aebd76829a8.tar.gz
android_bootable_recovery-430b7ae4699eb3685dcc0f7c736a9aebd76829a8.tar.bz2
android_bootable_recovery-430b7ae4699eb3685dcc0f7c736a9aebd76829a8.tar.lz
android_bootable_recovery-430b7ae4699eb3685dcc0f7c736a9aebd76829a8.tar.xz
android_bootable_recovery-430b7ae4699eb3685dcc0f7c736a9aebd76829a8.tar.zst
android_bootable_recovery-430b7ae4699eb3685dcc0f7c736a9aebd76829a8.zip
Diffstat (limited to 'edify/edify_parser.cpp')
-rw-r--r--edify/edify_parser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/edify/edify_parser.cpp b/edify/edify_parser.cpp
index 1b89cf21d..908fcf13b 100644
--- a/edify/edify_parser.cpp
+++ b/edify/edify_parser.cpp
@@ -66,12 +66,12 @@ int main(int argc, char** argv) {
ExprDump(0, root, buffer);
State state(buffer, nullptr);
- char* result = Evaluate(&state, root);
- if (result == NULL) {
+ std::string result;
+ if (!Evaluate(&state, root, &result)) {
printf("result was NULL, message is: %s\n",
(state.errmsg.empty() ? "(NULL)" : state.errmsg.c_str()));
} else {
- printf("result is [%s]\n", result);
+ printf("result is [%s]\n", result.c_str());
}
}
return 0;