Commit 58af0be4 authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

[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/+/2233985Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68302}
parent f3646333
......@@ -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()));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment