Move variable initialization to top of scope.

Welcome to MSVC, eventlog. It is safer here.

svn path=/trunk/; revision=42475
This commit is contained in:
Stefan Ginsberg 2009-08-07 19:19:46 +00:00
parent 5c28e5923e
commit 0787f783d7

View file

@ -369,6 +369,7 @@ NTSTATUS ElfrReportEventW(
DWORD dwStringsSize = 0;
DWORD dwError = ERROR_SUCCESS;
WCHAR *lpStrings;
int pos = 0;
lpEventSource = ElfGetEventLogSourceEntryByHandle(LogHandle);
if (!lpEventSource)
@ -418,7 +419,6 @@ NTSTATUS ElfrReportEventW(
return STATUS_NO_MEMORY;
}
int pos = 0;
for (i = 0; i < NumStrings; i++)
{
wcscpy((WCHAR*)(lpStrings + pos), Strings[i]->Buffer);