From 65d55d8a39fa6d3438b8b14f4b7a5bd961728142 Mon Sep 17 00:00:00 2001 From: "deanm@chromium.org" Date: Tue, 28 Jul 2009 21:15:56 +0000 Subject: Assorted fixes for 64-bit. Review URL: http://codereview.chromium.org/160288 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21891 0039d316-1c4b-4281-b951-d872f2087c98 --- net/base/file_stream_posix.cc | 4 ++-- net/disk_cache/mapped_file_posix.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'net') 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(buffer_) != -1); - if (reinterpret_cast(buffer_) == -1) + DCHECK(reinterpret_cast(buffer_) != -1); + if (reinterpret_cast(buffer_) == -1) buffer_ = 0; view_size_ = size; -- cgit v1.1