Fix incorrect SetupDiGetClassDevs error checking

This commit was merged in pull request #268.
This commit is contained in:
ahnada
2023-11-13 19:37:29 +01:00
committed by icex2
parent f8b2f5f40d
commit 09b3a6c24a
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ void dev_list_init(struct dev_list *devs, const GUID *class_guid)
devs->infolist = SetupDiGetClassDevs(
devs->class_guid, NULL, NULL, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);
if (devs->infolist == NULL) {
if (devs->infolist == INVALID_HANDLE_VALUE) {
log_fatal(
"SetupDiGetClassDevs failed: %08x", (unsigned int) GetLastError());
}