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

Commit 4b7ddd61 authored by Nick Kralevich's avatar Nick Kralevich Committed by Android (Google) Code Review
Browse files

Merge "Don't use TEMP_FAILURE_RETRY on close()" into mnc-dev

parents 91cf41cf 12c67f4d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ bool ReadFileToString(const std::string& path, std::string* content) {
    return false;
  }
  bool result = ReadFdToString(fd, content);
  TEMP_FAILURE_RETRY(close(fd));
  close(fd);
  return result;
}

@@ -102,7 +102,7 @@ bool WriteStringToFile(const std::string& content, const std::string& path,
    ALOGE("android::WriteStringToFile write failed: %s", strerror(errno));
    return CleanUpAfterFailedWrite(path);
  }
  TEMP_FAILURE_RETRY(close(fd));
  close(fd);
  return true;
}
#endif
@@ -116,7 +116,7 @@ bool WriteStringToFile(const std::string& content, const std::string& path) {
  }

  bool result = WriteStringToFd(content, fd);
  TEMP_FAILURE_RETRY(close(fd));
  close(fd);
  return result || CleanUpAfterFailedWrite(path);
}