Michael Stefaniuc : qmgr: Merge a helper function.

Alexandre Julliard julliard at winehq.org
Thu Dec 6 16:25:09 CST 2012


Module: wine
Branch: master
Commit: 7183c6953107291e276cd9ee027d87385ed83d91
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7183c6953107291e276cd9ee027d87385ed83d91

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Wed Dec  5 23:57:52 2012 +0100

qmgr: Merge a helper function.

---

 dlls/qmgr/enum_files.c |   19 +++++++------------
 1 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/dlls/qmgr/enum_files.c b/dlls/qmgr/enum_files.c
index 05659cf..aeb9d64 100644
--- a/dlls/qmgr/enum_files.c
+++ b/dlls/qmgr/enum_files.c
@@ -32,17 +32,6 @@ typedef struct
     ULONG indexFiles;
 } EnumBackgroundCopyFilesImpl;
 
-static void EnumBackgroundCopyFilesDestructor(EnumBackgroundCopyFilesImpl *This)
-{
-    ULONG i;
-
-    for(i = 0; i < This->numFiles; i++)
-        IBackgroundCopyFile_Release(This->files[i]);
-
-    HeapFree(GetProcessHeap(), 0, This->files);
-    HeapFree(GetProcessHeap(), 0, This);
-}
-
 static inline EnumBackgroundCopyFilesImpl *impl_from_IEnumBackgroundCopyFiles(IEnumBackgroundCopyFiles *iface)
 {
     return CONTAINING_RECORD(iface, EnumBackgroundCopyFilesImpl, IEnumBackgroundCopyFiles_iface);
@@ -77,9 +66,15 @@ static ULONG WINAPI BITS_IEnumBackgroundCopyFiles_Release(IEnumBackgroundCopyFil
 {
     EnumBackgroundCopyFilesImpl *This = impl_from_IEnumBackgroundCopyFiles(iface);
     ULONG ref = InterlockedDecrement(&This->ref);
+    ULONG i;
 
     if (ref == 0)
-        EnumBackgroundCopyFilesDestructor(This);
+    {
+        for(i = 0; i < This->numFiles; i++)
+            IBackgroundCopyFile_Release(This->files[i]);
+        HeapFree(GetProcessHeap(), 0, This->files);
+        HeapFree(GetProcessHeap(), 0, This);
+    }
 
     return ref;
 }




More information about the wine-cvs mailing list