Replace NULL with nullptr

This patch replaces NULL with nullptr as nullptr is preferred as null
pointers in Chromium coding style.

Bug: None
Change-Id: Ie6ab9d606d791bad2c50001815062c22e9ec0d25
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/102102
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
Jiawei Shao
2022-09-14 14:39:37 +00:00
committed by Dawn LUCI CQ
parent a48e46f3a4
commit 060137a712
4 changed files with 9 additions and 9 deletions

View File

@@ -102,18 +102,18 @@ class Pipe {
/// Queries whether the file at the given path is an executable or DLL.
bool ExecutableExists(const std::string& path) {
auto file = Handle(CreateFileA(path.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_READONLY, NULL));
auto file = Handle(CreateFileA(path.c_str(), GENERIC_READ, FILE_SHARE_READ, nullptr,
OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, nullptr));
if (!file) {
return false;
}
auto map = Handle(CreateFileMappingA(file, NULL, PAGE_READONLY, 0, 0, NULL));
auto map = Handle(CreateFileMappingA(file, nullptr, PAGE_READONLY, 0, 0, nullptr));
if (map == INVALID_HANDLE_VALUE) {
return false;
}
void* addr_header = MapViewOfFileEx(map, FILE_MAP_READ, 0, 0, 0, NULL);
void* addr_header = MapViewOfFileEx(map, FILE_MAP_READ, 0, 0, 0, nullptr);
// Dynamically obtain the address of, and call ImageNtHeader. This is done to avoid tint.exe
// needing to statically link Dbghelp.lib.