summaryrefslogtreecommitdiffstats
path: root/updater/updater.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-10-12 19:55:04 +0200
committerTianjie Xu <xunchang@google.com>2016-10-15 03:18:23 +0200
commitaced5d9e4e438ba478ce54f9217166b8ab7cc24f (patch)
treeb3bfca3430c25b7c35501497e0b8a0faf2251538 /updater/updater.cpp
parentMerge "edify: Some clean-ups to libedify." (diff)
downloadandroid_bootable_recovery-aced5d9e4e438ba478ce54f9217166b8ab7cc24f.tar
android_bootable_recovery-aced5d9e4e438ba478ce54f9217166b8ab7cc24f.tar.gz
android_bootable_recovery-aced5d9e4e438ba478ce54f9217166b8ab7cc24f.tar.bz2
android_bootable_recovery-aced5d9e4e438ba478ce54f9217166b8ab7cc24f.tar.lz
android_bootable_recovery-aced5d9e4e438ba478ce54f9217166b8ab7cc24f.tar.xz
android_bootable_recovery-aced5d9e4e438ba478ce54f9217166b8ab7cc24f.tar.zst
android_bootable_recovery-aced5d9e4e438ba478ce54f9217166b8ab7cc24f.zip
Diffstat (limited to '')
-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) {