Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0fe1227 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix bogus error checking on unique_fd"

parents 047582b5 8bd6f455
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
Original line number Diff line number Diff line
@@ -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;