Module: wine Branch: master Commit: ce6372d9b8f0dbff24ed94353c901394325a3720 URL: https://source.winehq.org/git/wine.git/?a=commit;h=ce6372d9b8f0dbff24ed94353...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Thu Feb 3 19:40:07 2022 +0100
d2d1/tests: Pass the hash size as DWORD in compare_sha1().
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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");