From ce6372d9b8f0dbff24ed94353c901394325a3720 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 3 Feb 2022 19:40:07 +0100 Subject: [PATCH] d2d1/tests: Pass the hash size as DWORD in compare_sha1(). Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- 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 b0aa02ad2a9..314d8b7ce60 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");