ICU-5349 Use UMTX_CHECK

X-SVN-Rev: 20690
This commit is contained in:
George Rhoten 2006-11-28 07:16:51 +00:00
parent fb89595684
commit 668854033c

View file

@ -955,9 +955,8 @@ const Locale* U_EXPORT2
Locale::getAvailableLocales(int32_t& count)
{
// for now, there is a hardcoded list, so just walk through that list and set it up.
umtx_lock(NULL);
UBool needInit = availableLocaleList == 0;
umtx_unlock(NULL);
UBool needInit;
UMTX_CHECK(NULL, availableLocaleList == NULL, needInit);
if (needInit) {
int32_t locCount = uloc_countAvailable();