summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2016-06-11 20:53:14 +0200
committerandroid-build-merger <android-build-merger@google.com>2016-06-11 20:53:14 +0200
commit1e67422f3734abb41f5d57d539a41f70fe424161 (patch)
tree6a58a43d2a60128a095e453ebedb758f6296175b
parentLog source/target build version to last_install (diff)
parentMerge \"updater: Fix the broken ReadFileFn.\" (diff)
downloadandroid_bootable_recovery-1e67422f3734abb41f5d57d539a41f70fe424161.tar
android_bootable_recovery-1e67422f3734abb41f5d57d539a41f70fe424161.tar.gz
android_bootable_recovery-1e67422f3734abb41f5d57d539a41f70fe424161.tar.bz2
android_bootable_recovery-1e67422f3734abb41f5d57d539a41f70fe424161.tar.lz
android_bootable_recovery-1e67422f3734abb41f5d57d539a41f70fe424161.tar.xz
android_bootable_recovery-1e67422f3734abb41f5d57d539a41f70fe424161.tar.zst
android_bootable_recovery-1e67422f3734abb41f5d57d539a41f70fe424161.zip
-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());