Paul Vriens : d3d9/tests: Fix size parameter for memcmp (Coccinelle).

Alexandre Julliard julliard at winehq.org
Fri Jan 8 10:28:57 CST 2010


Module: wine
Branch: master
Commit: e38e54e3f458260e20142a0b74dddcbab8070f50
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e38e54e3f458260e20142a0b74dddcbab8070f50

Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date:   Fri Jan  8 09:31:46 2010 +0100

d3d9/tests: Fix size parameter for memcmp (Coccinelle).

---

 dlls/d3d9/tests/vertexdeclaration.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/d3d9/tests/vertexdeclaration.c b/dlls/d3d9/tests/vertexdeclaration.c
index 82538ab..72b8f9f 100644
--- a/dlls/d3d9/tests/vertexdeclaration.c
+++ b/dlls/d3d9/tests/vertexdeclaration.c
@@ -214,7 +214,7 @@ static void test_get_declaration(IDirect3DVertexDeclaration9 *decl_ptr, D3DVERTE
     ok(hret == D3D_OK && num_elements == expected_num_elements,
             "GetDeclaration returned: hret 0x%x, num_elements %d. "
             "Expected hret 0x%x, num_elements %d.\n", hret, num_elements, D3D_OK, expected_num_elements);
-    i = memcmp(decl, vertex_decl, sizeof(vertex_decl));
+    i = memcmp(decl, vertex_decl, sizeof(*vertex_decl));
     ok (!i, "Original and returned vertexdeclarations are not the same\n");
     ZeroMemory(decl, sizeof(D3DVERTEXELEMENT9) * expected_num_elements);
 
@@ -223,7 +223,7 @@ static void test_get_declaration(IDirect3DVertexDeclaration9 *decl_ptr, D3DVERTE
     ok(hret == D3D_OK && num_elements == expected_num_elements,
             "GetDeclaration returned: hret 0x%x, num_elements %d. "
             "Expected hret 0x%x, num_elements %d.\n", hret, num_elements, D3D_OK, expected_num_elements);
-    i = memcmp(decl, vertex_decl, sizeof(vertex_decl));
+    i = memcmp(decl, vertex_decl, sizeof(*vertex_decl));
     ok (!i, "Original and returned vertexdeclarations are not the same\n");
 
     HeapFree(GetProcessHeap(), 0, decl);




More information about the wine-cvs mailing list