diff options
author | Tianjie Xu <xunchang@google.com> | 2016-10-18 02:28:30 +0200 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-10-18 02:28:30 +0200 |
commit | c012c3ce018b95cbf0a5c91e2a201343cc5bed6e (patch) | |
tree | b31060ec41d03e34c89b041e64141759c9b44318 /updater/updater.cpp | |
parent | Merge "init: move healthd to late-init" am: a01ffc73ef am: 4de11bb370 (diff) | |
parent | Merge "Change StringValue to use std::string" am: 2b17b24ae5 (diff) | |
download | android_bootable_recovery-c012c3ce018b95cbf0a5c91e2a201343cc5bed6e.tar android_bootable_recovery-c012c3ce018b95cbf0a5c91e2a201343cc5bed6e.tar.gz android_bootable_recovery-c012c3ce018b95cbf0a5c91e2a201343cc5bed6e.tar.bz2 android_bootable_recovery-c012c3ce018b95cbf0a5c91e2a201343cc5bed6e.tar.lz android_bootable_recovery-c012c3ce018b95cbf0a5c91e2a201343cc5bed6e.tar.xz android_bootable_recovery-c012c3ce018b95cbf0a5c91e2a201343cc5bed6e.tar.zst android_bootable_recovery-c012c3ce018b95cbf0a5c91e2a201343cc5bed6e.zip |
Diffstat (limited to 'updater/updater.cpp')
-rw-r--r-- | updater/updater.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/updater/updater.cpp b/updater/updater.cpp index f65fb2b20..0d19e53c4 100644 --- a/updater/updater.cpp +++ b/updater/updater.cpp @@ -152,13 +152,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"); @@ -189,8 +190,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) { |