mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
threads_win: fix improper cast to long * instead of LONG *
InterlockedExchangeAdd expects arguments of type LONG *, LONG but the int arguments were improperly cast to long *, long Note: - LONG is always 32 bit - long is 32 bit on Win32 VC x86/x64 and MingW-W64 - long is 64 bit on cygwin64 Signed-off-by: Georgi Valkov <gvalkov@gmail.com> Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/24941)
This commit is contained in:
parent
9f4d8c63e8
commit
71ae466181
@ -625,7 +625,7 @@ int CRYPTO_THREAD_compare_id(CRYPTO_THREAD_ID a, CRYPTO_THREAD_ID b)
|
||||
|
||||
int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock)
|
||||
{
|
||||
*ret = (int)InterlockedExchangeAdd((long volatile *)val, (long)amount)
|
||||
*ret = (int)InterlockedExchangeAdd((LONG volatile *)val, (LONG)amount)
|
||||
+ amount;
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user