[PATCH] setupapi/tests: Fix returned value checking.
Zebediah Figura
z.figura12 at gmail.com
Mon Dec 17 09:56:17 CST 2018
On 12/17/2018 09:52 AM, Zhiyi Zhang wrote:
> SetupDiCreateDeviceInfoList returns INVALID_HANDLE_VALUE(~0) on error
> instead of NULL.
>
> Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
> ---
> dlls/setupapi/tests/devinst.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c
> index bfffcb9c32..b4c5ce67ed 100644
> --- a/dlls/setupapi/tests/devinst.c
> +++ b/dlls/setupapi/tests/devinst.c
> @@ -286,7 +286,7 @@ static void test_device_info(void)
> ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#x.\n", GetLastError());
>
> set = SetupDiCreateDeviceInfoList(&guid, NULL);
> - ok(set != NULL, "Failed to create device info, error %#x.\n", GetLastError());
> + ok(set && set != INVALID_HANDLE_VALUE, "Failed to create device info, error %#x.\n", GetLastError());
>
Is there a reason that we're still checking if it's null, then?
More information about the wine-devel
mailing list