On 22.07.2015 12:57, Dmitry Timoshkov wrote:
dlls/setupapi/devinst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index b084a5e..5a18937 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -2340,7 +2340,7 @@ HDEVINFO WINAPI SetupDiGetClassDevsExW(const GUID *class, PCWSTR enumstr, HWND p if (!(flags & DIGCF_ALLCLASSES) && !class) { SetLastError(ERROR_INVALID_PARAMETER);
return NULL;
return INVALID_HANDLE_VALUE; } if (flags & unsupportedFlags) WARN("unsupported flags %08x\n", flags & unsupportedFlags);
How about a test for this and next one?
Nikolay Sivov bunglehead@gmail.com wrote:
@@ -2340,7 +2340,7 @@ HDEVINFO WINAPI SetupDiGetClassDevsExW(const GUID *class, PCWSTR enumstr, HWND p if (!(flags & DIGCF_ALLCLASSES) && !class) { SetLastError(ERROR_INVALID_PARAMETER);
return NULL;
return INVALID_HANDLE_VALUE; } if (flags & unsupportedFlags) WARN("unsupported flags %08x\n", flags & unsupportedFlags);
How about a test for this and next one?
Both fixes are in obvious category.
SetupDiGetClassDevsA/ExA already return INVALID_HANDLE_VALUE on failure, SetupDiGetClassDevsExW case is just a typo I believe.
Next patch just adds a check for what SetupDiCreateDeviceInfoListExW already returns on failure.