summaryrefslogtreecommitdiffstats
path: root/updater/updater.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-10-18 02:21:59 +0200
committerandroid-build-merger <android-build-merger@google.com>2016-10-18 02:21:59 +0200
commit13d8ee8c72ae3705819e1e0afae765e2d66a89bf (patch)
treec9f593eb6a4f2a2aaef3d400366525048e40a2b5 /updater/updater.cpp
parentMerge "init: move healthd to late-init" am: a01ffc73ef (diff)
parentMerge "Change StringValue to use std::string" (diff)
downloadandroid_bootable_recovery-13d8ee8c72ae3705819e1e0afae765e2d66a89bf.tar
android_bootable_recovery-13d8ee8c72ae3705819e1e0afae765e2d66a89bf.tar.gz
android_bootable_recovery-13d8ee8c72ae3705819e1e0afae765e2d66a89bf.tar.bz2
android_bootable_recovery-13d8ee8c72ae3705819e1e0afae765e2d66a89bf.tar.lz
android_bootable_recovery-13d8ee8c72ae3705819e1e0afae765e2d66a89bf.tar.xz
android_bootable_recovery-13d8ee8c72ae3705819e1e0afae765e2d66a89bf.tar.zst
android_bootable_recovery-13d8ee8c72ae3705819e1e0afae765e2d66a89bf.zip
Diffstat (limited to 'updater/updater.cpp')
-rw-r--r--updater/updater.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/updater/updater.cpp b/updater/updater.cpp
index c752ebbf3..47696b80c 100644
--- a/updater/updater.cpp
+++ b/updater/updater.cpp
@@ -151,13 +151,14 @@ int main(int argc, char** argv) {
}
}
- char* result = Evaluate(&state, root);
+ std::string result;
+ bool status = Evaluate(&state, root, &result);
if (have_eio_error) {
fprintf(cmd_pipe, "retry_update\n");
}
- if (result == NULL) {
+ if (!status) {
if (state.errmsg.empty()) {
printf("script aborted (no error message)\n");
fprintf(cmd_pipe, "ui_print script aborted (no error message)\n");
@@ -188,8 +189,7 @@ int main(int argc, char** argv) {
return 7;
} else {
- fprintf(cmd_pipe, "ui_print script succeeded: result was [%s]\n", result);
- free(result);
+ fprintf(cmd_pipe, "ui_print script succeeded: result was [%s]\n", result.c_str());
}
if (updater_info.package_zip) {