Merge "Fix bogus error checking on unique_fd" am: a0fe1227b8 am: 7367caad0f

am: 5e028e80cf

Change-Id: Ie850812c7050305c9ca987c63f088f655e250054
This commit is contained in:
Bernie Innocenti
2019-03-28 21:30:50 -07:00
committed by android-build-merger
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ static bool ReadPartitionToBuffer(const Partition& partition, FileContents* out,
}
android::base::unique_fd dev(open(partition.name.c_str(), O_RDONLY));
if (!dev) {
if (dev == -1) {
PLOG(ERROR) << "Failed to open eMMC partition \"" << partition << "\"";
} else {
std::vector<unsigned char> buffer(partition.size);
+1 -1
View File
@@ -392,7 +392,7 @@ int run_fuse_sideload(std::unique_ptr<FuseDataProvider>&& provider, const char*
}
fd.ffd.reset(open("/dev/fuse", O_RDWR));
if (!fd.ffd) {
if (fd.ffd == -1) {
perror("open /dev/fuse");
result = -1;
goto done;