msvcrt: Move definition of 2 static inline functions up and remove the forward declaration of those. Found by sparse.

Michael Stefaniuc mstefani at redhat.de
Tue Jun 19 15:49:04 CDT 2007


---
 dlls/msvcrt/main.c |   47 ++++++++++++++++++++++-------------------------
 1 files changed, 22 insertions(+), 25 deletions(-)

diff --git a/dlls/msvcrt/main.c b/dlls/msvcrt/main.c
index fa6affe..1edaa73 100644
--- a/dlls/msvcrt/main.c
+++ b/dlls/msvcrt/main.c
@@ -26,9 +26,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
 /* Index to TLS */
 DWORD msvcrt_tls_index;
 
-static inline BOOL msvcrt_init_tls(void);
-static inline BOOL msvcrt_free_tls(void);
-
 static const char* msvcrt_get_reason(DWORD reason)
 {
   switch (reason)
@@ -41,6 +38,28 @@ static const char* msvcrt_get_reason(DWORD reason)
   return "UNKNOWN";
 }
 
+static inline BOOL msvcrt_init_tls(void)
+{
+  msvcrt_tls_index = TlsAlloc();
+
+  if (msvcrt_tls_index == TLS_OUT_OF_INDEXES)
+  {
+    ERR("TlsAlloc() failed!\n");
+    return FALSE;
+  }
+  return TRUE;
+}
+
+static inline BOOL msvcrt_free_tls(void)
+{
+  if (!TlsFree(msvcrt_tls_index))
+  {
+    ERR("TlsFree() failed!\n");
+    return FALSE;
+  }
+  return TRUE;
+}
+
 /*********************************************************************
  *                  Init
  */
@@ -95,28 +114,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
   return TRUE;
 }
 
-static inline BOOL msvcrt_init_tls(void)
-{
-  msvcrt_tls_index = TlsAlloc();
-
-  if (msvcrt_tls_index == TLS_OUT_OF_INDEXES)
-  {
-    ERR("TlsAlloc() failed!\n");
-    return FALSE;
-  }
-  return TRUE;
-}
-
-static inline BOOL msvcrt_free_tls(void)
-{
-  if (!TlsFree(msvcrt_tls_index))
-  {
-    ERR("TlsFree() failed!\n");
-    return FALSE;
-  }
-  return TRUE;
-}
-
 /*********************************************************************
  *		$I10_OUTPUT (MSVCRT.@)
  * Function not really understood but needed to make the DLL work
-- 
1.5.0.6


-- 
Michael Stefaniuc               Tel.: +49-711-96437-199
Sr. Network Engineer            Fax.: +49-711-96437-111
Red Hat GmbH                    Email: mstefani at redhat.com
Hauptstaetterstr. 58            http://www.redhat.de/
D-70178 Stuttgart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070619/110d53e0/attachment.pgp


More information about the wine-patches mailing list