Index: base/files/memory_mapped_file_posix.cc |
diff --git a/base/files/memory_mapped_file_posix.cc b/base/files/memory_mapped_file_posix.cc |
index 168da923d469641cd7b17d80c7f10b53e67ada5b..d9a7e90f8ba4d8a3773f4513e48a589f1c3cade0 100644 |
--- a/base/files/memory_mapped_file_posix.cc |
+++ b/base/files/memory_mapped_file_posix.cc |
@@ -23,10 +23,10 @@ bool MemoryMappedFile::MapFileRegionToMemory( |
off_t map_start = 0; |
size_t map_size = 0; |
- int32 data_offset = 0; |
+ int32_t data_offset = 0; |
if (region == MemoryMappedFile::Region::kWholeFile) { |
- int64 file_len = file_.GetLength(); |
+ int64_t file_len = file_.GetLength(); |
if (file_len == -1) { |
DPLOG(ERROR) << "fstat " << file_.GetPlatformFile(); |
return false; |
@@ -38,8 +38,8 @@ bool MemoryMappedFile::MapFileRegionToMemory( |
// start and size to be page-aligned. Hence, we map here the page-aligned |
// outer region [|aligned_start|, |aligned_start| + |size|] which contains |
// |region| and then add up the |data_offset| displacement. |
- int64 aligned_start = 0; |
- int64 aligned_size = 0; |
+ int64_t aligned_start = 0; |
+ int64_t aligned_size = 0; |
CalculateVMAlignedBoundaries(region.offset, |
region.size, |
&aligned_start, |
@@ -49,9 +49,10 @@ bool MemoryMappedFile::MapFileRegionToMemory( |
// Ensure that the casts in the mmap call below are sane. |
if (aligned_start < 0 || aligned_size < 0 || |
aligned_start > std::numeric_limits<off_t>::max() || |
- static_cast<uint64>(aligned_size) > |
+ static_cast<uint64_t>(aligned_size) > |
std::numeric_limits<size_t>::max() || |
- static_cast<uint64>(region.size) > std::numeric_limits<size_t>::max()) { |
+ static_cast<uint64_t>(region.size) > |
+ std::numeric_limits<size_t>::max()) { |
DLOG(ERROR) << "Region bounds are not valid for mmap"; |
return false; |
} |
@@ -61,12 +62,8 @@ bool MemoryMappedFile::MapFileRegionToMemory( |
length_ = static_cast<size_t>(region.size); |
} |
- data_ = static_cast<uint8*>(mmap(NULL, |
- map_size, |
- PROT_READ, |
- MAP_SHARED, |
- file_.GetPlatformFile(), |
- map_start)); |
+ data_ = static_cast<uint8_t*>(mmap(NULL, map_size, PROT_READ, MAP_SHARED, |
+ file_.GetPlatformFile(), map_start)); |
if (data_ == MAP_FAILED) { |
DPLOG(ERROR) << "mmap " << file_.GetPlatformFile(); |
return false; |