ams: globally prefer R_RETURN to return for ams::Result

This commit is contained in:
Michael Scire 2022-03-26 14:48:33 -07:00
parent dd78ede99f
commit bbf22b4c60
325 changed files with 1955 additions and 1993 deletions

View file

@ -197,9 +197,7 @@ namespace ams::lm::srv {
.version = LogFileHeaderVersion
};
R_TRY(fs::WriteFile(file, 0, std::addressof(header), sizeof(header), fs::WriteOption::Flush));
R_SUCCEED();
R_RETURN(fs::WriteFile(file, 0, std::addressof(header), sizeof(header), fs::WriteOption::Flush));
}
bool WriteLogFileHeader(const char *path) {
@ -213,9 +211,7 @@ namespace ams::lm::srv {
ON_SCOPE_EXIT { fs::CloseFile(file); };
/* Write the data. */
R_TRY(fs::WriteFile(file, offset, data, size, fs::WriteOption::Flush));
R_SUCCEED();
R_RETURN(fs::WriteFile(file, offset, data, size, fs::WriteOption::Flush));
}
bool WriteLogFileBody(const char *path, s64 offset, const u8 *data, size_t size) {