summaryrefslogtreecommitdiffstats
path: root/updater
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2016-06-11 12:56:38 +0200
committerTao Bao <tbao@google.com>2016-07-01 02:04:12 +0200
commitccb0ba908a40df2d97afcaa9c7bf1bd7efa8fcfd (patch)
treee6c5499d7bc8135c740889ee6bf6e969cf089e74 /updater
parentCreate bootloader_message static library. (diff)
downloadandroid_bootable_recovery-ccb0ba908a40df2d97afcaa9c7bf1bd7efa8fcfd.tar
android_bootable_recovery-ccb0ba908a40df2d97afcaa9c7bf1bd7efa8fcfd.tar.gz
android_bootable_recovery-ccb0ba908a40df2d97afcaa9c7bf1bd7efa8fcfd.tar.bz2
android_bootable_recovery-ccb0ba908a40df2d97afcaa9c7bf1bd7efa8fcfd.tar.lz
android_bootable_recovery-ccb0ba908a40df2d97afcaa9c7bf1bd7efa8fcfd.tar.xz
android_bootable_recovery-ccb0ba908a40df2d97afcaa9c7bf1bd7efa8fcfd.tar.zst
android_bootable_recovery-ccb0ba908a40df2d97afcaa9c7bf1bd7efa8fcfd.zip
Diffstat (limited to 'updater')
-rw-r--r--updater/install.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/updater/install.cpp b/updater/install.cpp
index 1a647dfa5..005f9f97d 100644
--- a/updater/install.cpp
+++ b/updater/install.cpp
@@ -1417,7 +1417,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());