Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ntdll/sync.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c index d7319405889..a0a37b555e2 100644 --- a/dlls/ntdll/sync.c +++ b/dlls/ntdll/sync.c @@ -2026,11 +2026,11 @@ static NTSTATUS fast_release_srw_shared( RTL_SRWLOCK *lock ) #define SRWLOCK_RES_SHARED 0x00000001
#ifdef WORDS_BIGENDIAN -#define srwlock_key_exclusive(lock) (&lock->Ptr) -#define srwlock_key_shared(lock) ((void *)((char *)&lock->Ptr + 2)) +#define srwlock_key_exclusive(lock) ((void *)(((ULONG_PTR)&lock->Ptr + 1) & ~1)) +#define srwlock_key_shared(lock) ((void *)(((ULONG_PTR)&lock->Ptr + 3) & ~1)) #else -#define srwlock_key_exclusive(lock) ((void *)((char *)&lock->Ptr + 2)) -#define srwlock_key_shared(lock) (&lock->Ptr) +#define srwlock_key_exclusive(lock) ((void *)(((ULONG_PTR)&lock->Ptr + 3) & ~1)) +#define srwlock_key_shared(lock) ((void *)(((ULONG_PTR)&lock->Ptr + 1) & ~1)) #endif
static inline void srwlock_check_invalid( unsigned int val )