From 55b4e4e3543c1da0b4473e7ab9da34fb9fce0c00 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sat, 27 Mar 2010 03:16:42 +0300 Subject: [PATCH] shlwapi: Fix IUnknown_AtomicRelease prototype and simplify body a bit. --- dlls/shlwapi/ordinal.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c index 7c2d87c5317..019502dd940 100644 --- a/dlls/shlwapi/ordinal.c +++ b/dlls/shlwapi/ordinal.c @@ -1210,7 +1210,7 @@ HRESULT WINAPI ConnectToConnectionPoint(IUnknown* lpUnkSink, REFIID riid, BOOL f /************************************************************************* * @ [SHLWAPI.169] * - * Release an interface. + * Release an interface and zero a supplied pointer. * * PARAMS * lpUnknown [I] Object to release @@ -1218,19 +1218,16 @@ HRESULT WINAPI ConnectToConnectionPoint(IUnknown* lpUnkSink, REFIID riid, BOOL f * RETURNS * Nothing. */ -DWORD WINAPI IUnknown_AtomicRelease(IUnknown ** lpUnknown) +void WINAPI IUnknown_AtomicRelease(IUnknown ** lpUnknown) { - IUnknown *temp; + TRACE("(%p)\n", lpUnknown); - TRACE("(%p)\n",lpUnknown); - - if(!lpUnknown || !*((LPDWORD)lpUnknown)) return 0; - temp = *lpUnknown; - *lpUnknown = NULL; + if(!lpUnknown || !*lpUnknown) return; TRACE("doing Release\n"); - return IUnknown_Release(temp); + IUnknown_Release(*lpUnknown); + *lpUnknown = NULL; } /*************************************************************************