[clang-tidy] Use nullptr keyword
Recommended by clang-tidy's modernize-use-nullptr. Bug: v8:10488 Change-Id: I03a6af87f281c52edd01f3ad91f9ec6e28d398d0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2233985 Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/master@{#68302}
This commit is contained in:
parent
f36463331b
commit
58af0be444
@ -531,7 +531,7 @@ OS::MemoryMappedFile* OS::MemoryMappedFile::open(const char* name,
|
||||
OS::MemoryMappedFile* OS::MemoryMappedFile::create(const char* name,
|
||||
size_t size, void* initial) {
|
||||
if (FILE* file = fopen(name, "w+")) {
|
||||
if (size == 0) return new PosixMemoryMappedFile(file, 0, 0);
|
||||
if (size == 0) return new PosixMemoryMappedFile(file, nullptr, 0);
|
||||
size_t result = fwrite(initial, 1, size, file);
|
||||
if (result == size && !ferror(file)) {
|
||||
void* memory = mmap(OS::GetRandomMmapAddr(), result,
|
||||
|
@ -17,7 +17,7 @@ uint32_t Checksum(Vector<const byte> payload) {
|
||||
MSAN_MEMORY_IS_INITIALIZED(payload.begin(), payload.length());
|
||||
#endif // MEMORY_SANITIZER
|
||||
// Priming the adler32 call so it can see what CPU features are available.
|
||||
adler32(0, NULL, 0);
|
||||
adler32(0, nullptr, 0);
|
||||
return static_cast<uint32_t>(adler32(0, payload.begin(), payload.length()));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user