ntdll/tests: Avoid printing an unterminated string (DPH).

This commit is contained in:
Thomas Faber 2015-04-23 20:42:50 +02:00 committed by Alexandre Julliard
parent 168dd496cb
commit 3d9693fa61
1 changed files with 2 additions and 18 deletions

View File

@ -204,22 +204,9 @@ static NTSTATUS WINAPI QueryRoutine (IN PCWSTR ValueName, IN ULONG ValueType, IN
IN ULONG ValueLength, IN PVOID Context, IN PVOID EntryContext)
{
NTSTATUS ret = STATUS_SUCCESS;
int ValueNameLength = 0;
LPSTR ValName = 0;
trace("**Test %d**\n", CurrentTest);
if(ValueName)
{
ValueNameLength = lstrlenW(ValueName);
ValName = pRtlAllocateHeap(GetProcessHeap(), 0, ValueNameLength);
WideCharToMultiByte(CP_ACP, 0, ValueName, ValueNameLength+1, ValName, ValueNameLength, NULL, NULL);
trace("ValueName: %s\n", ValName);
}
else
trace("ValueName: (null)\n");
trace("ValueName: %s\n", wine_dbgstr_w(ValueName));
switch(ValueType)
{
@ -262,9 +249,6 @@ static NTSTATUS WINAPI QueryRoutine (IN PCWSTR ValueName, IN ULONG ValueType, IN
CurrentTest++;
if(ValName)
pRtlFreeHeap(GetProcessHeap(), 0, ValName);
return ret;
}