From: Andy Heninger Date: Tue, 20 Dec 2011 19:29:26 +0000 (+0000) Subject: ICU-9021 Thread safety in DigitList::getDouble(), incorporate review comment. X-Git-Tag: milestone-59-0-1~4197 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cec5a252fd64c2993734cefd1dc1cb1f3995b788;p=icu ICU-9021 Thread safety in DigitList::getDouble(), incorporate review comment. X-SVN-Rev: 31162 --- diff --git a/icu4c/source/i18n/digitlst.cpp b/icu4c/source/i18n/digitlst.cpp index 1503440fca4..db7a148a4df 100644 --- a/icu4c/source/i18n/digitlst.cpp +++ b/icu4c/source/i18n/digitlst.cpp @@ -760,9 +760,9 @@ DigitList::set(double source) // uprv_decNumberFromString() will parse the string expecting '.' as a // decimal separator, however sprintf() can use ',' in certain locales. // Overwrite a ',' with '.' here before proceeding. - char *decimalPt = strchr(rep, ','); - if (decimalPt != NULL) { - *decimalPt = '.'; + char *decimalSeparator = strchr(rep, ','); + if (decimalSeparator != NULL) { + *decimalSeparator = '.'; } // Create a decNumber from the string.