refactor: replace remaining NULL with nullptr (#40053)

refactor: use nullptr everywhere
This commit is contained in:
Milan Burda 2023-10-03 21:26:35 +02:00 committed by GitHub
parent 9d0e6d09f0
commit 04b2ba84cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 98 additions and 93 deletions

View file

@ -47,16 +47,16 @@ HANDLE GetParentProcessHandle(base::ProcessHandle handle) {
ResolveNTFunctionPtr("NtQueryInformationProcess", &NtQueryInformationProcess);
if (!NtQueryInformationProcess) {
LOG(ERROR) << "Unable to get NtQueryInformationProcess";
return NULL;
return nullptr;
}
PROCESS_BASIC_INFORMATION pbi;
LONG status =
NtQueryInformationProcess(handle, ProcessBasicInformation, &pbi,
sizeof(PROCESS_BASIC_INFORMATION), NULL);
sizeof(PROCESS_BASIC_INFORMATION), nullptr);
if (!NT_SUCCESS(status)) {
LOG(ERROR) << "NtQueryInformationProcess failed";
return NULL;
return nullptr;
}
return ::OpenProcess(PROCESS_ALL_ACCESS, TRUE,
@ -131,7 +131,7 @@ void RelauncherSynchronizeWithParent() {
// Notify the parent process that it can quit now.
StringType name = internal::GetWaitEventName(process.Pid());
base::win::ScopedHandle wait_event(
CreateEvent(NULL, TRUE, FALSE, name.c_str()));
CreateEvent(nullptr, TRUE, FALSE, name.c_str()));
::SetEvent(wait_event.Get());
// Wait for parent process to quit.