tests: Simplify get_refcount().

This commit is contained in:
Józef Kucia 2017-05-28 11:45:50 +02:00
parent a680fdd91b
commit 6151119eef

View File

@ -60,11 +60,11 @@ static size_t align(size_t addr, unsigned int alignment)
return (addr + (alignment - 1)) & ~(alignment - 1); return (addr + (alignment - 1)) & ~(alignment - 1);
} }
#define get_refcount(a) get_refcount_((IUnknown *)a) static ULONG get_refcount(void *iface)
static ULONG get_refcount_(IUnknown *iface)
{ {
IUnknown_AddRef(iface); IUnknown *unk = iface;
return IUnknown_Release(iface); IUnknown_AddRef(unk);
return IUnknown_Release(unk);
} }
#define check_interface(a, b, c) check_interface_(__LINE__, (IUnknown *)a, b, c) #define check_interface(a, b, c) check_interface_(__LINE__, (IUnknown *)a, b, c)