Commit 814ca129 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

msvcrt: Move definition of 2 static inline functions up and remove the forward…

msvcrt: Move definition of 2 static inline functions up and remove the forward declaration of those. Found by sparse.
parent 832c43f9
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment