Michael Stefaniuc : qmgr: Merge a helper function.
Alexandre Julliard
julliard at winehq.org
Wed Dec 5 13:43:10 CST 2012
Module: wine
Branch: master
Commit: 258d1ff897c62f3d568e56b9a0eb96e066aed323
URL: http://source.winehq.org/git/wine.git/?a=commit;h=258d1ff897c62f3d568e56b9a0eb96e066aed323
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Tue Dec 4 23:27:01 2012 +0100
qmgr: Merge a helper function.
---
dlls/qmgr/enum_jobs.c | 20 +++++++-------------
1 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/dlls/qmgr/enum_jobs.c b/dlls/qmgr/enum_jobs.c
index 3da0d13..20f427c 100644
--- a/dlls/qmgr/enum_jobs.c
+++ b/dlls/qmgr/enum_jobs.c
@@ -37,17 +37,6 @@ static inline EnumBackgroundCopyJobsImpl *impl_from_IEnumBackgroundCopyJobs(IEnu
return CONTAINING_RECORD(iface, EnumBackgroundCopyJobsImpl, IEnumBackgroundCopyJobs_iface);
}
-static void EnumBackgroundCopyJobsDestructor(EnumBackgroundCopyJobsImpl *This)
-{
- ULONG i;
-
- for(i = 0; i < This->numJobs; i++)
- IBackgroundCopyJob_Release(This->jobs[i]);
-
- HeapFree(GetProcessHeap(), 0, This->jobs);
- HeapFree(GetProcessHeap(), 0, This);
-}
-
static HRESULT WINAPI BITS_IEnumBackgroundCopyJobs_QueryInterface(IEnumBackgroundCopyJobs *iface,
REFIID riid, void **ppv)
{
@@ -78,11 +67,16 @@ static ULONG WINAPI BITS_IEnumBackgroundCopyJobs_Release(IEnumBackgroundCopyJobs
{
EnumBackgroundCopyJobsImpl *This = impl_from_IEnumBackgroundCopyJobs(iface);
ULONG ref = InterlockedDecrement(&This->ref);
+ ULONG i;
TRACE("(%p) ref=%d\n", This, ref);
- if (ref == 0)
- EnumBackgroundCopyJobsDestructor(This);
+ if (ref == 0) {
+ for(i = 0; i < This->numJobs; i++)
+ IBackgroundCopyJob_Release(This->jobs[i]);
+ HeapFree(GetProcessHeap(), 0, This->jobs);
+ HeapFree(GetProcessHeap(), 0, This);
+ }
return ref;
}
More information about the wine-cvs
mailing list