[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:
Ng Zhi An 2020-06-09 18:19:34 -07:00 committed by Commit Bot
parent f36463331b
commit 58af0be444
2 changed files with 2 additions and 2 deletions

View File

@ -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,

View File

@ -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()));
}