user32/tests: Pass HEAP_ZERO_MEMORY to HeapAlloc() instead of clearing the memory with a separate memset() call.

Michael Stefaniuc mstefani at redhat.de
Thu Dec 6 18:14:24 CST 2007


---
 dlls/user32/tests/listbox.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/dlls/user32/tests/listbox.c b/dlls/user32/tests/listbox.c
index 4e4d49f..e73474e 100644
--- a/dlls/user32/tests/listbox.c
+++ b/dlls/user32/tests/listbox.c
@@ -168,13 +168,11 @@ check (const struct listbox_test test)
 	WCHAR *txtw;
 	int resA, resW;
 
-	txt = HeapAlloc (GetProcessHeap(), 0, size+1);
-	memset(txt, 0, size+1);
+	txt = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, size+1);
 	resA=SendMessageA(hLB, LB_GETTEXT, i, (LPARAM)txt);
         ok(!strcmp (txt, strings[i]), "returned string for item %d does not match %s vs %s\n", i, txt, strings[i]);
 
-	txtw = HeapAlloc (GetProcessHeap(), 0, 2*size+2);
-	memset(txtw, 0, 2*size+2);
+	txtw = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, 2*size+2);
 	resW=SendMessageW(hLB, LB_GETTEXT, i, (LPARAM)txtw);
 	if (resA != resW) {
             trace("SendMessageW(LB_GETTEXT) not supported on this platform (resA=%d resW=%d), skipping...\n",
-- 
1.5.3.7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20071207/da6bc125/attachment.pgp 


More information about the wine-patches mailing list