Thomas Faber : ntdll/tests: Avoid printing an unterminated string (DPH).
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Apr 24 08:48:51 CDT 2015
Module: wine
Branch: master
Commit: 3d9693fa617034c7f11c2408f0191c6ee4b88834
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3d9693fa617034c7f11c2408f0191c6ee4b88834
Author: Thomas Faber <thomas.faber at reactos.org>
Date: Thu Apr 23 20:42:50 2015 +0200
ntdll/tests: Avoid printing an unterminated string (DPH).
---
dlls/ntdll/tests/reg.c | 20 ++------------------
1 file changed, 2 insertions(+), 18 deletions(-)
diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c
index 0af009f..6d04668 100644
--- a/dlls/ntdll/tests/reg.c
+++ b/dlls/ntdll/tests/reg.c
@@ -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("**Test %d**\n", CurrentTest);
+ 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;
}
More information about the wine-cvs
mailing list