From 668854033ce9c6c5d604e5ef8faf097b30cc023b Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Tue, 28 Nov 2006 07:16:51 +0000 Subject: [PATCH] ICU-5349 Use UMTX_CHECK X-SVN-Rev: 20690 --- icu4c/source/common/locid.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/icu4c/source/common/locid.cpp b/icu4c/source/common/locid.cpp index b62a25409eb..5b48dcc27b7 100644 --- a/icu4c/source/common/locid.cpp +++ b/icu4c/source/common/locid.cpp @@ -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();