[WS2_32]
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 4 Mar 2017 23:55:30 +0000 (23:55 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 4 Mar 2017 23:55:30 +0000 (23:55 +0000)
- Let require explicit semicolons when using the Ws***(Un)Lock macros (and thus remove the semicolon from their definition).

svn path=/trunk/; revision=74066

reactos/dll/win32/ws2_32/src/async.c
reactos/dll/win32/ws2_32/src/dcatalog.c
reactos/dll/win32/ws2_32/src/dprocess.c
reactos/dll/win32/ws2_32/src/nscatalo.c
reactos/dll/win32/ws2_32/src/nsquery.c
reactos/dll/win32/ws2_32/src/rasdial.c
reactos/dll/win32/ws2_32/src/rnr.c
reactos/dll/win32/ws2_32/src/startup.c

index df353ad..52eb42e 100644 (file)
@@ -21,8 +21,8 @@ HANDLE WsAsyncCurrentTaskHandle;
 HANDLE WsAsyncCancelledTaskHandle;
 HINSTANCE WsAsyncDllHandle;
 
-#define WsAsyncLock()   EnterCriticalSection(&WsAsyncCritSect);
-#define WsAsyncUnlock() LeaveCriticalSection(&WsAsyncCritSect);
+#define WsAsyncLock()       EnterCriticalSection(&WsAsyncCritSect)
+#define WsAsyncUnlock()     LeaveCriticalSection(&WsAsyncCritSect)
 
 /* FUNCTIONS *****************************************************************/
 
index 6daa7ab..3b7929f 100644 (file)
@@ -15,8 +15,8 @@
 
 /* DATA **********************************************************************/
 
-#define WsTcLock()          EnterCriticalSection(&Catalog->Lock);
-#define WsTcUnlock()        LeaveCriticalSection(&Catalog->Lock);
+#define WsTcLock()          EnterCriticalSection(&Catalog->Lock)
+#define WsTcUnlock()        LeaveCriticalSection(&Catalog->Lock)
 
 /* FUNCTIONS *****************************************************************/
 
index 1e98384..ad3ef57 100644 (file)
@@ -14,8 +14,8 @@
 
 PWSPROCESS CurrentWsProcess;
 
-#define WsProcLock()      EnterCriticalSection(&Process->ThreadLock);
-#define WsProcUnlock()    LeaveCriticalSection(&Process->ThreadLock);
+#define WsProcLock()        EnterCriticalSection(&Process->ThreadLock)
+#define WsProcUnlock()      LeaveCriticalSection(&Process->ThreadLock)
 
 /* FUNCTIONS *****************************************************************/
 
index 3bcb6e7..d98c4c8 100644 (file)
@@ -15,8 +15,8 @@
 
 /* DATA **********************************************************************/
 
-#define WsNcLock()          EnterCriticalSection(&Catalog->Lock);
-#define WsNcUnlock()        LeaveCriticalSection(&Catalog->Lock);
+#define WsNcLock()          EnterCriticalSection(&Catalog->Lock)
+#define WsNcUnlock()        LeaveCriticalSection(&Catalog->Lock)
 
 /* FUNCTIONS *****************************************************************/
 
@@ -370,7 +370,7 @@ WsNcEnumerateCatalogItems(IN PNSCATALOG Catalog,
         GoOn = Callback(Context, CatalogEntry);
     }
 
-    /* Release lock */
+    /* Release the lock */
     WsNcUnlock();
 }
 
@@ -413,7 +413,7 @@ WsNcLoadProvider(IN PNSCATALOG Catalog,
         }
     }
 
-    /* Release the lock */
+    /* Release the lock and return */
     WsNcUnlock();
     return ErrorCode;
 }
index b67c837..ca39659 100644 (file)
@@ -12,8 +12,8 @@
 
 /* DATA **********************************************************************/
 
-#define WsNqLock()      EnterCriticalSection(&NsQuery->Lock);
-#define WsNqUnlock()    LeaveCriticalSection(&NsQuery->Lock);
+#define WsNqLock()          EnterCriticalSection(&NsQuery->Lock)
+#define WsNqUnlock()        LeaveCriticalSection(&NsQuery->Lock)
 
 /* FUNCTIONS *****************************************************************/
 
index 3c49957..4617589 100644 (file)
@@ -37,8 +37,8 @@ PWS_ATTEMPT_AUTODIAL_ADDR lpfnWSAttemptAutodialAddr;
 PWS_ATTEMPT_AUTODIAL_NAME lpfnWSAttemptAutodialName;
 PWS_NOTE_SUCCESSFUL_HOSTENT_LOOKUP lpfnWSNoteSuccessfulHostentLookup;
 
-#define WsRasLock()          EnterCriticalSection(&WsRasHelperLock);
-#define WsRasUnlock()        LeaveCriticalSection(&WsRasHelperLock);
+#define WsRasLock()         EnterCriticalSection(&WsRasHelperLock)
+#define WsRasUnlock()       LeaveCriticalSection(&WsRasHelperLock)
 
 /* FUNCTIONS *****************************************************************/
 
index 579b85a..97f43f6 100644 (file)
@@ -34,6 +34,7 @@ WSAAddressToStringA(IN LPSOCKADDR lpsaAddress,
     PTCATALOG_ENTRY CatalogEntry;
     LPWSTR UnicodeString;
     DWORD Length = *lpdwAddressStringLength;
+
     DPRINT("WSAAddressToStringA: %p\n", lpsaAddress);
 
     /* Enter prolog */
@@ -136,6 +137,7 @@ WSAAddressToStringW(IN LPSOCKADDR lpsaAddress,
     DWORD CatalogEntryId;
     PTCATALOG Catalog;
     PTCATALOG_ENTRY CatalogEntry;
+
     DPRINT("WSAAddressToStringW: %p\n", lpsaAddress);
 
     /* Enter prolog */
@@ -203,6 +205,7 @@ WSALookupServiceEnd(IN HANDLE hLookup)
     PWSTHREAD Thread;
     INT ErrorCode;
     PNSQUERY Query = hLookup;
+
     DPRINT("WSALookupServiceEnd: %lx\n", hLookup);
 
     /* Enter prolog */
@@ -246,6 +249,7 @@ WSALookupServiceBeginA(IN LPWSAQUERYSETA lpqsRestrictions,
     INT ErrorCode;
     LPWSAQUERYSETW UnicodeQuerySet = NULL;
     DWORD UnicodeQuerySetSize = 0;
+
     DPRINT("WSALookupServiceBeginA: %p\n", lpqsRestrictions);
 
     /* Verify pointer */
@@ -317,6 +321,7 @@ WSALookupServiceBeginW(IN LPWSAQUERYSETW lpqsRestrictions,
     PWSTHREAD Thread;
     INT ErrorCode;
     PNSQUERY Query;
+
     DPRINT("WSALookupServiceBeginW: %p\n", lpqsRestrictions);
 
     /* Enter prolog */
@@ -387,6 +392,7 @@ WSALookupServiceNextW(IN HANDLE hLookup,
     PWSTHREAD Thread;
     INT ErrorCode;
     PNSQUERY Query = hLookup;
+
     DPRINT("WSALookupServiceNextW: %lx\n", hLookup);
 
     /* Enter prolog */
@@ -440,6 +446,7 @@ WSALookupServiceNextA(IN HANDLE hLookup,
     LPWSAQUERYSETW UnicodeQuerySet;
     DWORD UnicodeQuerySetSize;
     INT ErrorCode;
+
     DPRINT("WSALookupServiceNextA: %lx\n", hLookup);
 
     /* Verify pointers */
@@ -734,6 +741,7 @@ WSAEnumNameSpaceProvidersInternal(IN OUT LPDWORD lpdwBufferLength,
     PWSPROCESS WsProcess;
     PNSCATALOG Catalog;
     NSPROVIDER_ENUM_CONTEXT Context;
+
     DPRINT("WSAEnumNameSpaceProvidersInternal: %lx\n", lpnspBuffer);
 
     if (!lpdwBufferLength)
@@ -829,6 +837,7 @@ WSAStringToAddressA(IN LPSTR AddressString,
     PTCATALOG_ENTRY CatalogEntry;
     LPWSTR UnicodeString;
     DWORD Length = (DWORD)strlen(AddressString) + 1;
+
     DPRINT("WSAStringToAddressA: %s\n", AddressString);
 
     /* Enter prolog */
@@ -920,6 +929,7 @@ WSAStringToAddressW(IN LPWSTR AddressString,
     DWORD CatalogEntryId;
     PTCATALOG Catalog;
     PTCATALOG_ENTRY CatalogEntry;
+
     DPRINT("WSAStringToAddressW: %S\n", AddressString);
 
     /* Enter prolog */
index 3dfd983..86706c8 100644 (file)
@@ -18,8 +18,8 @@
 PWS_SOCK_POST_ROUTINE WsSockPostRoutine = NULL;
 CRITICAL_SECTION WsStartupLock;
 
-#define WsStartupLock()          EnterCriticalSection(&WsStartupLock);
-#define WsStartupUnlock()        LeaveCriticalSection(&WsStartupLock);
+#define WsStartupLock()     EnterCriticalSection(&WsStartupLock)
+#define WsStartupUnlock()   LeaveCriticalSection(&WsStartupLock)
 
 /* FUNCTIONS *****************************************************************/