[misc] miscellaneous code cleanup and fixes

* Don't use hDrive handle for longer than necessary
* Move all the popcount() function calls into missing.h
* Ensure that the thread_affinity[] array is properly sized
* Improve timeouts for conflicting process search
This commit is contained in:
Pete Batard 2020-09-09 17:00:39 +01:00
parent 7df88aa931
commit b3caf638b6
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
6 changed files with 25 additions and 33 deletions

View file

@ -2052,7 +2052,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
static ULONG ulRegister = 0;
static LPITEMIDLIST pidlDesktop = NULL;
static SHChangeNotifyEntry NotifyEntry;
static DWORD_PTR thread_affinity[4];
static DWORD_PTR thread_affinity[CHECKSUM_MAX + 1];
static HFONT hyperlink_font = NULL;
LONG lPos;
BOOL set_selected_fs;
@ -2851,7 +2851,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
}
}
if (!CheckDriveAccess(CHECK_DRIVE_TIMEOUT, TRUE))
if (!CheckDriveAccess(SEARCH_PROCESS_TIMEOUT, TRUE))
goto aborted_start;
GetWindowTextU(hDeviceList, tmp, ARRAYSIZE(tmp));