summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2016-06-11 21:00:54 +0200
committerandroid-build-merger <android-build-merger@google.com>2016-06-11 21:00:54 +0200
commit2a069a9dfdb1941550795fb8c0f57d8c0565cf3b (patch)
tree24d96a544ae6463e7ae7c25abb5343e070b44769
parentLog source/target build version to last_install am: b0ddae55e5 am: dcf1089771 (diff)
parentMerge \\\"updater: Fix the broken ReadFileFn.\\\" am: 4ddd5edf31 am: 89dfe730d4 (diff)
downloadandroid_bootable_recovery-2a069a9dfdb1941550795fb8c0f57d8c0565cf3b.tar
android_bootable_recovery-2a069a9dfdb1941550795fb8c0f57d8c0565cf3b.tar.gz
android_bootable_recovery-2a069a9dfdb1941550795fb8c0f57d8c0565cf3b.tar.bz2
android_bootable_recovery-2a069a9dfdb1941550795fb8c0f57d8c0565cf3b.tar.lz
android_bootable_recovery-2a069a9dfdb1941550795fb8c0f57d8c0565cf3b.tar.xz
android_bootable_recovery-2a069a9dfdb1941550795fb8c0f57d8c0565cf3b.tar.zst
android_bootable_recovery-2a069a9dfdb1941550795fb8c0f57d8c0565cf3b.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());