advapi32/tests: Don't check the content of the buffer if ReadEventLog() fails.

This commit is contained in:
Francois Gouget 2023-10-13 12:42:19 +02:00 committed by Alexandre Julliard
parent b34ec64537
commit 0e44c658b6

View file

@ -996,7 +996,11 @@ static void test_readwrite(void)
ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ,
0, buf, needed, &read, &needed);
ok(ret, "Expected success: %ld\n", GetLastError());
if (!ret)
{
winetest_pop_context();
break;
}
record = (EVENTLOGRECORD *)buf;
ok(record->Length == read,