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

This commit is contained in:
Michael Stefaniuc 2007-06-19 22:49:04 +02:00 committed by Alexandre Julliard
parent 832c43f9a7
commit 814ca1295a
1 changed files with 22 additions and 25 deletions

View File

@ -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