Commit 40d4fbe4 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Simplify get_current_locale_noalloc implementation.

parent a7f124eb
......@@ -1174,20 +1174,11 @@ MSVCRT__locale_t CDECL get_current_locale_noalloc(MSVCRT__locale_t locale)
{
thread_data_t *data = msvcrt_get_thread_data();
if(!data || !(data->locale_flags & LOCALE_THREAD))
{
_lock_locales();
*locale = *MSVCRT_locale;
}
else
{
update_thread_locale(data);
locale->locinfo = data->locinfo;
locale->mbcinfo = data->mbcinfo;
}
grab_locinfo(locale->locinfo);
if(locale->locinfo == MSVCRT_locale->locinfo)
_unlock_locales();
InterlockedIncrement(&locale->mbcinfo->refcount);
return locale;
}
......
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