Index: net/disk_cache/mapped_file_posix.cc |
diff --git a/net/disk_cache/mapped_file_posix.cc b/net/disk_cache/mapped_file_posix.cc |
index b9d843567cefd3bb2c80c3ccbbddb1fd18d88c91..a28a7d4370a3b6314a05096f9ab68fe120181a8f 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); |
Evan Martin
2009/07/28 21:15:29
how about comparing to MAP_FAILED?
|
+ if (reinterpret_cast<intptr_t>(buffer_) == -1) |
buffer_ = 0; |
view_size_ = size; |