Francois Gouget : secur32: Make the cs critical section static.

Alexandre Julliard julliard at winehq.org
Tue Nov 15 13:17:34 CST 2011


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

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Tue Nov 15 14:41:11 2011 +0100

secur32: Make the cs critical section static.

---

 dlls/secur32/secur32.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/dlls/secur32/secur32.c b/dlls/secur32/secur32.c
index ae1326c..05221d4 100644
--- a/dlls/secur32/secur32.c
+++ b/dlls/secur32/secur32.c
@@ -83,6 +83,13 @@ static void SECUR32_freeProviders(void);
  */
 
 static CRITICAL_SECTION cs;
+static CRITICAL_SECTION_DEBUG cs_debug =
+{
+    0, 0, &cs,
+    { &cs_debug.ProcessLocksList, &cs_debug.ProcessLocksList },
+      0, 0, { (DWORD_PTR)(__FILE__ ": cs") }
+};
+static CRITICAL_SECTION cs = { &cs_debug, -1, 0, 0, 0, 0 };
 static SecurePackageTable *packageTable = NULL;
 static SecureProviderTable *providerTable = NULL;
 
@@ -553,8 +560,6 @@ static void SECUR32_initializeProviders(void)
     LSTATUS apiRet;
 
     TRACE("\n");
-    InitializeCriticalSection(&cs);
-    cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": cs");
     /* First load built-in providers */
     SECUR32_initSchannelSP();
     SECUR32_initNTLMSP();
@@ -703,7 +708,6 @@ static void SECUR32_freeProviders(void)
     }
 
     LeaveCriticalSection(&cs);
-    cs.DebugInfo->Spare[0] = 0;
     DeleteCriticalSection(&cs);
 }
 




More information about the wine-cvs mailing list