Fixed SetLastError test.

WLog initialisation checks environment variables, which may not exist
and therefore set an error. So initialise it before doing tests.
This commit is contained in:
Armin Novak 2015-01-16 10:11:50 +01:00
parent 5046b1d035
commit 052b4b4365

View File

@ -60,6 +60,11 @@ int TestErrorSetLastError(int argc, char* argv[])
DWORD error;
HANDLE threads[4];
/* We must initialize WLog here. It will check for settings
* in the environment and if the variables are not set, the last
* error state is changed... */
WLog_GetRoot();
SetLastError(ERROR_ACCESS_DENIED);
error = GetLastError();