Matteo Bruni : d3dx11/tests: Use CRT allocation functions.

Alexandre Julliard julliard at winehq.org
Wed Mar 2 15:39:50 CST 2022


Module: wine
Branch: master
Commit: 8d47851835d72ffe8404fc93b877464390475f2c
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=8d47851835d72ffe8404fc93b877464390475f2c

Author: Matteo Bruni <mbruni at codeweavers.com>
Date:   Wed Mar  2 14:05:30 2022 +0100

d3dx11/tests: Use CRT allocation functions.

Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3dx11_43/tests/d3dx11.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/dlls/d3dx11_43/tests/d3dx11.c b/dlls/d3dx11_43/tests/d3dx11.c
index 89fc0721c92..357a84ce457 100644
--- a/dlls/d3dx11_43/tests/d3dx11.c
+++ b/dlls/d3dx11_43/tests/d3dx11.c
@@ -21,7 +21,6 @@
 #include "d3d11.h"
 #include "d3dx11.h"
 #include "wine/test.h"
-#include "wine/heap.h"
 
 #ifndef MAKEFOURCC
 #define MAKEFOURCC(ch0, ch1, ch2, ch3)  \
@@ -503,8 +502,8 @@ static HRESULT WINAPI test_d3dinclude_open(ID3DInclude *iface, D3D_INCLUDE_TYPE
 
     if (!strcmp(filename, "include1.h"))
     {
-        buffer = heap_alloc(strlen(include1));
-        CopyMemory(buffer, include1, strlen(include1));
+        buffer = malloc(strlen(include1));
+        memcpy(buffer, include1, strlen(include1));
         *bytes = strlen(include1);
         ok(include_type == D3D_INCLUDE_LOCAL, "Unexpected include type %d.\n", include_type);
         ok(!strncmp(include2, parent_data, strlen(include2)),
@@ -512,8 +511,8 @@ static HRESULT WINAPI test_d3dinclude_open(ID3DInclude *iface, D3D_INCLUDE_TYPE
     }
     else if (!strcmp(filename, "include\\include2.h"))
     {
-        buffer = heap_alloc(strlen(include2));
-        CopyMemory(buffer, include2, strlen(include2));
+        buffer = malloc(strlen(include2));
+        memcpy(buffer, include2, strlen(include2));
         *bytes = strlen(include2);
         ok(!parent_data, "Unexpected parent_data value.\n");
         ok(include_type == D3D_INCLUDE_LOCAL, "Unexpected include type %d.\n", include_type);
@@ -530,7 +529,7 @@ static HRESULT WINAPI test_d3dinclude_open(ID3DInclude *iface, D3D_INCLUDE_TYPE
 
 static HRESULT WINAPI test_d3dinclude_close(ID3DInclude *iface, const void *data)
 {
-    heap_free((void *)data);
+    free((void *)data);
     return S_OK;
 }
 




More information about the wine-cvs mailing list