chore: Clean up shutdownExistingProcesses (unused var and use if-init) in Windows watchdog
This commit is contained in:
parent
c84b4e3f00
commit
cd5ba1382d
1 changed files with 1 additions and 3 deletions
|
|
@ -394,11 +394,9 @@ void MSWindowsWatchdog::shutdownExistingProcesses()
|
|||
}
|
||||
|
||||
// now just iterate until we can find winlogon.exe pid
|
||||
DWORD pid = 0;
|
||||
while (gotEntry) {
|
||||
|
||||
HANDLE handle = openProcessForKill(entry);
|
||||
if (handle) {
|
||||
if (HANDLE handle = openProcessForKill(entry); handle != nullptr) {
|
||||
LOG((CLOG_INFO "shutting down process, name=%s, pid=%d", entry.szExeFile, entry.th32ProcessID));
|
||||
deskflow::platform::MSWindowsProcess::shutdown(handle, entry.th32ProcessID);
|
||||
CloseHandle(handle);
|
||||
|
|
|
|||
Loading…
Reference in a new issue