dmloader: Remove an unused critical section.

Francois Gouget fgouget at codeweavers.com
Mon Nov 14 05:32:50 CST 2011


---

The CritSect field is totally unused and is currently dead code. So 
unless some application depend on it being there (which should not be 
the case) it may as well be removed.

(it was introduced in 2004: 72c80375fa2f28f30eeffdba676162cbb293cda1)

 dlls/dmloader/dmloader_private.h |    2 --
 dlls/dmloader/loader.c           |    6 ------
 2 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/dlls/dmloader/dmloader_private.h b/dlls/dmloader/dmloader_private.h
index a6de708..47a794c 100644
--- a/dlls/dmloader/dmloader_private.h
+++ b/dlls/dmloader/dmloader_private.h
@@ -99,8 +99,6 @@ struct IDirectMusicLoaderImpl {
 	struct list *pObjects;
 	/* settings for certain object classes */
 	struct list *pClassSettings;
-	/* critical section */
-	CRITICAL_SECTION CritSect;
 };
 
 /* contained object entry */
diff --git a/dlls/dmloader/loader.c b/dlls/dmloader/loader.c
index e83444d..868f4e0 100644
--- a/dlls/dmloader/loader.c
+++ b/dlls/dmloader/loader.c
@@ -100,9 +100,6 @@ static ULONG WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_Release (LPDIRECTM
             /* firstly, release the cache */
             IDirectMusicLoader8_ClearCache (iface, &GUID_DirectMusicAllTypes);
             /* FIXME: release all allocated entries */
-            /* destroy critical section */
-            /*This->CritSect.DebugInfo->Spare[0] = 0;
-              DeleteCriticalSection (&This->CritSect); */
             HeapFree (GetProcessHeap(), 0, This);
             unlock_module();
 	}
@@ -864,10 +861,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderImpl (LPCGUID lpcGUID, LPVOID *ppob
 	}
 	obj->LoaderVtbl = &DirectMusicLoader_Loader_Vtbl;
 	obj->dwRef = 0; /* will be inited with QueryInterface */
-	/* init critical section */
 	/* init cache/alias list */
-	/*InitializeCriticalSection (&obj->CritSect);
-	obj->CritSect.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": IDirectMusicLoaderImpl.CritSect"); */
 	obj->pObjects = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(struct list));
 	list_init (obj->pObjects);
 	/* init settings */
-- 
1.7.7.1




More information about the wine-patches mailing list