summaryrefslogtreecommitdiffstats
path: root/updater/install.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2016-06-11 20:57:05 +0200
committerandroid-build-merger <android-build-merger@google.com>2016-06-11 20:57:05 +0200
commitd241c85cd0a1bc3b73af2e1faa99fcb7c7ad2b84 (patch)
tree8fb94652e6577a5f7d1b9575236e02ed73a0429c /updater/install.cpp
parentLog source/target build version to last_install am: b0ddae55e5 (diff)
parentMerge \\"updater: Fix the broken ReadFileFn.\\" am: 4ddd5edf31 (diff)
downloadandroid_bootable_recovery-d241c85cd0a1bc3b73af2e1faa99fcb7c7ad2b84.tar
android_bootable_recovery-d241c85cd0a1bc3b73af2e1faa99fcb7c7ad2b84.tar.gz
android_bootable_recovery-d241c85cd0a1bc3b73af2e1faa99fcb7c7ad2b84.tar.bz2
android_bootable_recovery-d241c85cd0a1bc3b73af2e1faa99fcb7c7ad2b84.tar.lz
android_bootable_recovery-d241c85cd0a1bc3b73af2e1faa99fcb7c7ad2b84.tar.xz
android_bootable_recovery-d241c85cd0a1bc3b73af2e1faa99fcb7c7ad2b84.tar.zst
android_bootable_recovery-d241c85cd0a1bc3b73af2e1faa99fcb7c7ad2b84.zip
Diffstat (limited to '')
-rw-r--r--updater/install.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/updater/install.cpp b/updater/install.cpp
index a65b32d81..4148e5415 100644
--- a/updater/install.cpp
+++ b/updater/install.cpp
@@ -1418,7 +1418,7 @@ Value* ReadFileFn(const char* name, State* state, int argc, Expr* argv[]) {
v->data = nullptr;
FileContents fc;
- if (LoadFileContents(filename, &fc) != 0) {
+ if (LoadFileContents(filename, &fc) == 0) {
v->data = static_cast<char*>(malloc(fc.data.size()));
if (v->data != nullptr) {
memcpy(v->data, fc.data.data(), fc.data.size());