summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2016-06-11 20:49:21 +0200
committerandroid-build-merger <android-build-merger@google.com>2016-06-11 20:49:21 +0200
commit89dfe730d4b1d5b3e64d0ec405003781e263bdf3 (patch)
treeea8ef456c6241d791644de1fd7b5cfb828a38953
parentMerge \"Remove etc/META-INF/com/google/android/update-script.\" (diff)
parentMerge "updater: Fix the broken ReadFileFn." (diff)
downloadandroid_bootable_recovery-89dfe730d4b1d5b3e64d0ec405003781e263bdf3.tar
android_bootable_recovery-89dfe730d4b1d5b3e64d0ec405003781e263bdf3.tar.gz
android_bootable_recovery-89dfe730d4b1d5b3e64d0ec405003781e263bdf3.tar.bz2
android_bootable_recovery-89dfe730d4b1d5b3e64d0ec405003781e263bdf3.tar.lz
android_bootable_recovery-89dfe730d4b1d5b3e64d0ec405003781e263bdf3.tar.xz
android_bootable_recovery-89dfe730d4b1d5b3e64d0ec405003781e263bdf3.tar.zst
android_bootable_recovery-89dfe730d4b1d5b3e64d0ec405003781e263bdf3.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 bab2fe166..cfd6a97ee 100644
--- a/updater/install.cpp
+++ b/updater/install.cpp
@@ -1409,7 +1409,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());