summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/base/file_stream_posix.cc4
-rw-r--r--net/disk_cache/mapped_file_posix.cc4
2 files changed, 4 insertions, 4 deletions
diff --git a/net/base/file_stream_posix.cc b/net/base/file_stream_posix.cc
index fbfeb04..5c55781 100644
--- a/net/base/file_stream_posix.cc
+++ b/net/base/file_stream_posix.cc
@@ -382,7 +382,7 @@ int FileStream::Read(
return ERR_UNEXPECTED;
// read(..., 0) will return 0, which indicates end-of-file.
- DCHECK(buf_len > 0 && buf_len <= SSIZE_MAX);
+ DCHECK(buf_len > 0);
DCHECK(open_flags_ & base::PLATFORM_FILE_READ);
if (async_context_.get()) {
@@ -420,7 +420,7 @@ int FileStream::ReadUntilComplete(char *buf, int buf_len) {
int FileStream::Write(
const char* buf, int buf_len, CompletionCallback* callback) {
// write(..., 0) will return 0, which indicates end-of-file.
- DCHECK(buf_len > 0 && buf_len <= SSIZE_MAX);
+ DCHECK(buf_len > 0);
if (!IsOpen())
return ERR_UNEXPECTED;
diff --git a/net/disk_cache/mapped_file_posix.cc b/net/disk_cache/mapped_file_posix.cc
index b9d8435..a28a7d4 100644
--- a/net/disk_cache/mapped_file_posix.cc
+++ b/net/disk_cache/mapped_file_posix.cc
@@ -23,8 +23,8 @@ void* MappedFile::Init(const std::wstring& name, size_t size) {
buffer_ = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED,
platform_file(), 0);
init_ = true;
- DCHECK(reinterpret_cast<int>(buffer_) != -1);
- if (reinterpret_cast<int>(buffer_) == -1)
+ DCHECK(reinterpret_cast<intptr_t>(buffer_) != -1);
+ if (reinterpret_cast<intptr_t>(buffer_) == -1)
buffer_ = 0;
view_size_ = size;