From 31a582989fc56dab4310a53b8e19ee2421a13424 Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Thu, 1 Nov 2012 17:34:44 +0100 Subject: [PATCH] dmusic: Display new ref in AddRef and Release. --- dlls/dmusic/clock.c | 25 ++++++++++++------------- dlls/dmusic/collection.c | 4 ++-- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/dlls/dmusic/clock.c b/dlls/dmusic/clock.c index 4d9a1b40454..2a8cd09e712 100644 --- a/dlls/dmusic/clock.c +++ b/dlls/dmusic/clock.c @@ -45,30 +45,29 @@ static HRESULT WINAPI IReferenceClockImpl_QueryInterface(IReferenceClock *iface, static ULONG WINAPI IReferenceClockImpl_AddRef(IReferenceClock *iface) { - IReferenceClockImpl *This = impl_from_IReferenceClock(iface); - ULONG refCount = InterlockedIncrement(&This->ref); + IReferenceClockImpl *This = impl_from_IReferenceClock(iface); + ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p)->(ref before=%u)\n", This, refCount - 1); + TRACE("(%p)->(): new ref = %u\n", This, ref); - DMUSIC_LockModule(); + DMUSIC_LockModule(); - return refCount; + return ref; } static ULONG WINAPI IReferenceClockImpl_Release(IReferenceClock *iface) { - IReferenceClockImpl *This = impl_from_IReferenceClock(iface); - ULONG refCount = InterlockedDecrement(&This->ref); + IReferenceClockImpl *This = impl_from_IReferenceClock(iface); + ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p)->(ref before=%u)\n", This, refCount + 1); + TRACE("(%p)->(): new ref = %u\n", This, ref); - if (!refCount) { - HeapFree(GetProcessHeap(), 0, This); - } + if (!ref) + HeapFree(GetProcessHeap(), 0, This); - DMUSIC_UnlockModule(); + DMUSIC_UnlockModule(); - return refCount; + return ref; } /* IReferenceClockImpl IReferenceClock part: */ diff --git a/dlls/dmusic/collection.c b/dlls/dmusic/collection.c index c06d9886fba..c1545b25336 100644 --- a/dlls/dmusic/collection.c +++ b/dlls/dmusic/collection.c @@ -80,7 +80,7 @@ static ULONG WINAPI IDirectMusicCollectionImpl_IDirectMusicCollection_AddRef(LPD IDirectMusicCollectionImpl *This = impl_from_IDirectMusicCollection(iface); ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p/%p)->(): new ref = %u)\n", iface, This, ref); + TRACE("(%p/%p)->(): new ref = %u\n", iface, This, ref); DMUSIC_LockModule(); @@ -92,7 +92,7 @@ static ULONG WINAPI IDirectMusicCollectionImpl_IDirectMusicCollection_Release(LP IDirectMusicCollectionImpl *This = impl_from_IDirectMusicCollection(iface); ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p/%p)->(): new ref = %u)\n", iface, This, ref); + TRACE("(%p/%p)->(): new ref = %u\n", iface, This, ref); if (!ref) HeapFree(GetProcessHeap(), 0, This);