mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 20:13:37 +00:00
msvcrt: Move definition of 2 static inline functions up and remove the forward declaration of those. Found by sparse.
This commit is contained in:
parent
832c43f9a7
commit
814ca1295a
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue