[PATCH 2/5] d2d1/tests: Pass the hash size as DWORD in compare_sha1().

Henri Verbeet hverbeet at codeweavers.com
Thu Feb 3 12:40:07 CST 2022


Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
 dlls/d2d1/tests/d2d1.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index b0aa02ad2a90..314d8b7ce60d 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -536,6 +536,7 @@ static BOOL compare_sha1(void *data, unsigned int pitch, unsigned int bpp,
     HCRYPTPROV provider;
     BYTE hash_data[20];
     HCRYPTHASH hash;
+    DWORD hash_size;
     unsigned int i;
     char sha1[41];
     BOOL ret;
@@ -552,10 +553,10 @@ static BOOL compare_sha1(void *data, unsigned int pitch, unsigned int bpp,
     }
     ok(ret, "Failed to hash data.\n");
 
-    i = sizeof(hash_data);
-    ret = CryptGetHashParam(hash, HP_HASHVAL, hash_data, &i, 0);
+    hash_size = sizeof(hash_data);
+    ret = CryptGetHashParam(hash, HP_HASHVAL, hash_data, &hash_size, 0);
     ok(ret, "Failed to get hash value.\n");
-    ok(i == sizeof(hash_data), "Got unexpected hash size %u.\n", i);
+    ok(hash_size == sizeof(hash_data), "Got unexpected hash size %u.\n", hash_size);
 
     ret = CryptDestroyHash(hash);
     ok(ret, "Failed to destroy hash.\n");
-- 
2.30.2




More information about the wine-devel mailing list