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

Unified Diff: src/allocation.cc

Issue 390004: Fix warnings on Win64. (Closed)
Patch Set: Created 11 years, 1 month 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 | « SConstruct ('k') | src/api.cc » ('j') | src/api.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/allocation.cc
diff --git a/src/allocation.cc b/src/allocation.cc
index 41724b68cfb71d37190ceb26f085ab6a064b216e..678f4fd7d2f23495d1ed76adc03a0a17f07dc369 100644
--- a/src/allocation.cc
+++ b/src/allocation.cc
@@ -80,7 +80,7 @@ void AllStatic::operator delete(void* p) {
char* StrDup(const char* str) {
- int length = strlen(str);
+ int length = StrLength(str);
char* result = NewArray<char>(length + 1);
memcpy(result, str, length * kCharSize);
result[length] = '\0';
@@ -88,8 +88,8 @@ char* StrDup(const char* str) {
}
-char* StrNDup(const char* str, size_t n) {
- size_t length = strlen(str);
+char* StrNDup(const char* str, int n) {
+ int length = StrLength(str);
if (n < length) length = n;
char* result = NewArray<char>(length + 1);
memcpy(result, str, length * kCharSize);
« no previous file with comments | « SConstruct ('k') | src/api.cc » ('j') | src/api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698