Commit 655e7f98 authored by Thomas Faber's avatar Thomas Faber Committed by Alexandre Julliard

setupapi/tests: Avoid side-effect in an assert.

parent 5d85f578
......@@ -63,10 +63,12 @@ static BOOL (WINAPI *pSetupGetInfFileListW)(PCWSTR, DWORD, PWSTR, DWORD, PDWORD)
static void create_inf_file(LPCSTR filename, const char *data)
{
DWORD res;
BOOL ret;
HANDLE handle = CreateFileA(filename, GENERIC_WRITE, 0, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
assert(handle != INVALID_HANDLE_VALUE);
assert(WriteFile(handle, data, strlen(data), &res, NULL));
ret = WriteFile(handle, data, strlen(data), &res, NULL);
assert(ret != 0);
CloseHandle(handle);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment