]> granicus.if.org Git - icu/commitdiff
ICU-9021 Thread safety in DigitList::getDouble(), incorporate review comment.
authorAndy Heninger <andy.heninger@gmail.com>
Tue, 20 Dec 2011 19:29:26 +0000 (19:29 +0000)
committerAndy Heninger <andy.heninger@gmail.com>
Tue, 20 Dec 2011 19:29:26 +0000 (19:29 +0000)
X-SVN-Rev: 31162

icu4c/source/i18n/digitlst.cpp

index 1503440fca42d4a8cb1f89e0de1b21fd0974f24f..db7a148a4dfcefdd861eb810993f5eecf4721b4d 100644 (file)
@@ -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.