diff --git a/dlls/msxml3/tests/httpreq.c b/dlls/msxml3/tests/httpreq.c index f228b419ae4..b50b153d146 100644 --- a/dlls/msxml3/tests/httpreq.c +++ b/dlls/msxml3/tests/httpreq.c @@ -43,9 +43,10 @@ #define EXPECT_REF(node,ref) _expect_ref((IUnknown*)node, ref, __LINE__) static void _expect_ref(IUnknown* obj, ULONG ref, int line) { - ULONG rc = IUnknown_AddRef(obj); - IUnknown_Release(obj); - ok_(__FILE__,line)(rc-1 == ref, "expected refcount %d, got %d\n", ref, rc-1); + ULONG rc; + IUnknown_AddRef(obj); + rc = IUnknown_Release(obj); + ok_(__FILE__, line)(rc == ref, "expected refcount %d, got %d\n", ref, rc); } DEFINE_GUID(SID_SContainerDispatch, 0xb722be00, 0x4e68, 0x101b, 0xa2, 0xbc, 0x00, 0xaa, 0x00, 0x40, 0x47, 0x70); diff --git a/dlls/msxml3/tests/saxreader.c b/dlls/msxml3/tests/saxreader.c index a2dc3fb0f7a..5fc62b75540 100644 --- a/dlls/msxml3/tests/saxreader.c +++ b/dlls/msxml3/tests/saxreader.c @@ -43,9 +43,10 @@ static const WCHAR emptyW[] = {0}; #define EXPECT_REF(obj,ref) _expect_ref((IUnknown*)obj, ref, __LINE__) static void _expect_ref(IUnknown* obj, ULONG ref, int line) { - ULONG rc = IUnknown_AddRef(obj); - IUnknown_Release(obj); - ok_(__FILE__,line)(rc-1 == ref, "expected refcount %d, got %d\n", ref, rc-1); + ULONG rc; + IUnknown_AddRef(obj); + rc = IUnknown_Release(obj); + ok_(__FILE__, line)(rc == ref, "expected refcount %d, got %d\n", ref, rc); } static LONG get_refcount(void *iface)