Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Unified Diff: src/conversions.cc

Issue 3557010: Reapply r5603 with additional fix: use OS::StrNCpy instead of posix strncpy. (Closed)
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/strtod.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/conversions.cc
diff --git a/src/conversions.cc b/src/conversions.cc
index d4180640518279db9a19ab9580f6d15b5800cb80..a7a0867663926d7cb9c32366c39e58f94350ae2b 100644
--- a/src/conversions.cc
+++ b/src/conversions.cc
@@ -354,7 +354,7 @@ static double InternalStringToInt(Iterator current, EndMark end, int radix) {
ASSERT(buffer_pos < kBufferSize);
buffer[buffer_pos] = '\0';
Vector<char> buffer_vector(buffer, buffer_pos);
- return sign ? -strtod(buffer_vector, NULL) : strtod(buffer_vector, NULL);
+ return sign ? -Strtod(buffer_vector, 0) : Strtod(buffer_vector, 0);
}
// The following code causes accumulating rounding error for numbers greater
@@ -653,7 +653,7 @@ static double InternalStringToDouble(Iterator current,
ASSERT(buffer_pos < kBufferSize);
buffer[buffer_pos] = '\0';
- double converted = strtod(Vector<char>(buffer, buffer_pos), exponent);
+ double converted = Strtod(Vector<char>(buffer, buffer_pos), exponent);
return sign? -converted: converted;
}
« no previous file with comments | « no previous file | src/strtod.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698