summaryrefslogtreecommitdiffstats
path: root/thirdparty/icu4c/common/putil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/icu4c/common/putil.cpp')
-rw-r--r--thirdparty/icu4c/common/putil.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/thirdparty/icu4c/common/putil.cpp b/thirdparty/icu4c/common/putil.cpp
index ab25f3b996..92c7940827 100644
--- a/thirdparty/icu4c/common/putil.cpp
+++ b/thirdparty/icu4c/common/putil.cpp
@@ -1498,7 +1498,6 @@ static void U_CALLCONV dataDirectoryInitFn() {
}
u_setDataDirectory(path);
- return;
}
U_CAPI const char * U_EXPORT2
@@ -1622,7 +1621,7 @@ static const char *uprv_getPOSIXIDForCategory(int category)
* of nullptr, will modify the libc behavior.
*/
posixID = setlocale(category, nullptr);
- if ((posixID == 0)
+ if ((posixID == nullptr)
|| (uprv_strcmp("C", posixID) == 0)
|| (uprv_strcmp("POSIX", posixID) == 0))
{
@@ -1636,16 +1635,16 @@ static const char *uprv_getPOSIXIDForCategory(int category)
posixID = getenv(category == LC_MESSAGES ? "LC_MESSAGES" : "LC_CTYPE");
if ((posixID == 0) || (posixID[0] == '\0')) {
#else
- if (posixID == 0) {
+ if (posixID == nullptr) {
posixID = getenv(category == LC_MESSAGES ? "LC_MESSAGES" : "LC_CTYPE");
- if (posixID == 0) {
+ if (posixID == nullptr) {
#endif
posixID = getenv("LANG");
}
}
}
}
- if ((posixID==0)
+ if ((posixID == nullptr)
|| (uprv_strcmp("C", posixID) == 0)
|| (uprv_strcmp("POSIX", posixID) == 0))
{
@@ -1665,7 +1664,7 @@ static const char *uprv_getPOSIXIDForCategory(int category)
static const char *uprv_getPOSIXIDForDefaultLocale()
{
static const char* posixID = nullptr;
- if (posixID == 0) {
+ if (posixID == nullptr) {
posixID = uprv_getPOSIXIDForCategory(LC_MESSAGES);
}
return posixID;