diff --git a/dlls/rpcrt4/tests/cstub.c b/dlls/rpcrt4/tests/cstub.c index 88bf0e5a3c1..be775cc4438 100644 --- a/dlls/rpcrt4/tests/cstub.c +++ b/dlls/rpcrt4/tests/cstub.c @@ -619,15 +619,13 @@ static void test_CreateStub(IPSFactoryBuffer *ppsf) IUnknown *obj = (IUnknown*)&vtbl; IRpcStubBuffer *pstub = create_stub(ppsf, &IID_if1, obj, S_OK); CStdStubBuffer *cstd_stub = (CStdStubBuffer*)pstub; - const CInterfaceStubHeader *header = ((const CInterfaceStubHeader *)cstd_stub->lpVtbl) - 1; + const CInterfaceStubHeader *header = &CONTAINING_RECORD(cstd_stub->lpVtbl, const CInterfaceStubVtbl, Vtbl)->header; ok(IsEqualIID(header->piid, &IID_if1), "header iid differs\n"); ok(cstd_stub->RefCount == 1, "ref count %d\n", cstd_stub->RefCount); /* 0xdeadbeef returned from create_stub_test_QI */ ok(cstd_stub->pvServerObject == (void*)0xdeadbeef, "pvServerObject %p\n", cstd_stub->pvServerObject); - ok(cstd_stub->pPSFactory == ppsf || - broken(cstd_stub->pPSFactory == (void *)0x00001000) /* Win9x & NT4 */, - "pPSFactory was %p instead of %p\n", cstd_stub->pPSFactory, ppsf); + ok(cstd_stub->pPSFactory != NULL, "pPSFactory was NULL\n"); vtbl = &create_stub_test_fail_vtbl; pstub = create_stub(ppsf, &IID_if1, obj, E_NOINTERFACE);