mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 22:20:26 +00:00
setupapi/tests: Avoid side-effect in an assert.
This commit is contained in:
parent
5d85f57814
commit
655e7f98db
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user