Michael Stefaniuc : krnl386.exe16: Don't open code CONTAINING_RECORD().
Alexandre Julliard
julliard at winehq.org
Mon Sep 26 16:15:08 CDT 2011
Module: wine
Branch: master
Commit: 2ce0957e210174a3be681ada0605b638013819cf
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2ce0957e210174a3be681ada0605b638013819cf
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Sun Sep 25 23:45:35 2011 +0200
krnl386.exe16: Don't open code CONTAINING_RECORD().
---
dlls/krnl386.exe16/wowthunk.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/krnl386.exe16/wowthunk.c b/dlls/krnl386.exe16/wowthunk.c
index c6c28a3..feb882b 100644
--- a/dlls/krnl386.exe16/wowthunk.c
+++ b/dlls/krnl386.exe16/wowthunk.c
@@ -223,7 +223,7 @@ static DWORD call16_handler( EXCEPTION_RECORD *record, EXCEPTION_REGISTRATION_RE
if (record->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND))
{
/* unwinding: restore the stack pointer in the TEB, and leave the Win16 mutex */
- STACK32FRAME *frame32 = (STACK32FRAME *)((char *)frame - offsetof(STACK32FRAME,frame));
+ STACK32FRAME *frame32 = CONTAINING_RECORD(frame, STACK32FRAME, frame);
NtCurrentTeb()->WOW32Reserved = (void *)frame32->frame16;
_LeaveWin16Lock();
}
More information about the wine-cvs
mailing list