From 6151119eef7bb1415d90d340999110d9e30dfc79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Sun, 28 May 2017 11:45:50 +0200 Subject: [PATCH] tests: Simplify get_refcount(). --- tests/d3d12.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/d3d12.c b/tests/d3d12.c index b493029d..ef88e1d9 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -60,11 +60,11 @@ static size_t align(size_t addr, unsigned int alignment) return (addr + (alignment - 1)) & ~(alignment - 1); } -#define get_refcount(a) get_refcount_((IUnknown *)a) -static ULONG get_refcount_(IUnknown *iface) +static ULONG get_refcount(void *iface) { - IUnknown_AddRef(iface); - return IUnknown_Release(iface); + IUnknown *unk = iface; + IUnknown_AddRef(unk); + return IUnknown_Release(unk); } #define check_interface(a, b, c) check_interface_(__LINE__, (IUnknown *)a, b, c)