Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1151)

Unified Diff: util/file/file_io.cc

Issue 1416493006: Change file op |ssize_t|s to FileOperationResult (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: fixes Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/crashpad_database_util.cc ('k') | util/file/file_reader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/file/file_io.cc
diff --git a/util/file/file_io.cc b/util/file/file_io.cc
index 6f2d0b58811e4850ca8a4fc4c10f285a0807d091..98eb3404a9560af361e6065247352b4b23a589a4 100644
--- a/util/file/file_io.cc
+++ b/util/file/file_io.cc
@@ -20,8 +20,8 @@
namespace crashpad {
bool LoggingReadFile(FileHandle file, void* buffer, size_t size) {
- ssize_t expect = base::checked_cast<ssize_t>(size);
- ssize_t rv = ReadFile(file, buffer, size);
+ FileOperationResult expect = base::checked_cast<FileOperationResult>(size);
+ FileOperationResult rv = ReadFile(file, buffer, size);
if (rv < 0) {
PLOG(ERROR) << "read";
return false;
@@ -35,8 +35,8 @@ bool LoggingReadFile(FileHandle file, void* buffer, size_t size) {
}
bool LoggingWriteFile(FileHandle file, const void* buffer, size_t size) {
- ssize_t expect = base::checked_cast<ssize_t>(size);
- ssize_t rv = WriteFile(file, buffer, size);
+ FileOperationResult expect = base::checked_cast<FileOperationResult>(size);
+ FileOperationResult rv = WriteFile(file, buffer, size);
if (rv < 0) {
PLOG(ERROR) << "write";
return false;
@@ -59,7 +59,7 @@ void CheckedWriteFile(FileHandle file, const void* buffer, size_t size) {
void CheckedReadFileAtEOF(FileHandle file) {
char c;
- ssize_t rv = ReadFile(file, &c, 1);
+ FileOperationResult rv = ReadFile(file, &c, 1);
if (rv < 0) {
PCHECK(rv == 0) << "read";
} else {
« no previous file with comments | « tools/crashpad_database_util.cc ('k') | util/file/file_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698