Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- dlls/rpcrt4/ndr_marshall.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index dbf40746b4..70e78795f2 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -132,8 +132,6 @@ static inline void align_pointer_offset_clear( unsigned char **ptr, unsigned cha #define NDR_TABLE_SIZE 128 #define NDR_TABLE_MASK 127
-#define NDRSContextFromValue(user_context) (NDR_SCONTEXT)((char *)(user_context) - (char *)NDRSContextValue((NDR_SCONTEXT)NULL)) - static unsigned char *WINAPI NdrBaseTypeMarshall(PMIDL_STUB_MESSAGE, unsigned char *, PFORMAT_STRING); static unsigned char *WINAPI NdrBaseTypeUnmarshall(PMIDL_STUB_MESSAGE, unsigned char **, PFORMAT_STRING, unsigned char); static void WINAPI NdrBaseTypeBufferSize(PMIDL_STUB_MESSAGE, unsigned char *, PFORMAT_STRING); @@ -7002,7 +7000,7 @@ static unsigned char *WINAPI NdrContextHandleMarshall( } else { - NDR_SCONTEXT ctxt = NDRSContextFromValue(pMemory); + NDR_SCONTEXT ctxt = CONTAINING_RECORD(pMemory, struct _NDR_SCONTEXT, userContext); NDR_RUNDOWN rundown = pStubMsg->StubDesc->apfnNdrRundownRoutines[pFormat[2]]; NdrServerContextNewMarshall(pStubMsg, ctxt, rundown, pFormat); }