summaryrefslogtreecommitdiffstats
path: root/uncrypt
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2016-03-30 00:48:08 +0200
committerAndroid (Google) Code Review <android-gerrit@google.com>2016-03-30 00:48:08 +0200
commit912e87e91d15c35c18ce6710bf6a0b34f50b3672 (patch)
treee50b0004812d507742f520d61d6f879f9c4cbe3c /uncrypt
parentuncrypt: remove --read-bcb option. (diff)
parentuncrypt: fix call to close(). (diff)
downloadandroid_bootable_recovery-912e87e91d15c35c18ce6710bf6a0b34f50b3672.tar
android_bootable_recovery-912e87e91d15c35c18ce6710bf6a0b34f50b3672.tar.gz
android_bootable_recovery-912e87e91d15c35c18ce6710bf6a0b34f50b3672.tar.bz2
android_bootable_recovery-912e87e91d15c35c18ce6710bf6a0b34f50b3672.tar.lz
android_bootable_recovery-912e87e91d15c35c18ce6710bf6a0b34f50b3672.tar.xz
android_bootable_recovery-912e87e91d15c35c18ce6710bf6a0b34f50b3672.tar.zst
android_bootable_recovery-912e87e91d15c35c18ce6710bf6a0b34f50b3672.zip
Diffstat (limited to 'uncrypt')
-rw-r--r--uncrypt/uncrypt.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/uncrypt/uncrypt.cpp b/uncrypt/uncrypt.cpp
index 8003f9029..2ef093579 100644
--- a/uncrypt/uncrypt.cpp
+++ b/uncrypt/uncrypt.cpp
@@ -372,7 +372,7 @@ static int produce_block_map(const char* path, const char* map_file, const char*
ALOGE("failed to fsync \"%s\": %s", tmp_map_file.c_str(), strerror(errno));
return -1;
}
- if (close(mapfd.get() == -1)) {
+ if (close(mapfd.get()) == -1) {
ALOGE("failed to close %s: %s", tmp_map_file.c_str(), strerror(errno));
return -1;
}
@@ -406,7 +406,7 @@ static int produce_block_map(const char* path, const char* map_file, const char*
ALOGE("failed to fsync %s: %s", dir_name.c_str(), strerror(errno));
return -1;
}
- if (close(dfd.get() == -1)) {
+ if (close(dfd.get()) == -1) {
ALOGE("failed to close %s: %s", dir_name.c_str(), strerror(errno));
return -1;
}