libc: Simplify __get_locale()

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	fuz
Differential Revision:	https://reviews.freebsd.org/D53908
This commit is contained in:
Dag-Erling Smørgrav
2025-11-26 17:54:52 +01:00
parent 974ecf6890
commit 5af240c54b
+2 -4
View File
@@ -200,11 +200,9 @@ extern _Thread_local locale_t __thread_locale;
*/
static inline locale_t __get_locale(void)
{
if (!__has_thread_locale) {
if (!__has_thread_locale || __thread_locale == NULL)
return (&__xlocale_global_locale);
}
return (__thread_locale ? __thread_locale : &__xlocale_global_locale);
return (__thread_locale);
}
/**