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

Unified Diff: runtime/vm/isolate.cc

Issue 1331623002: Uses SNPRINT macro where possible. Otherwise uses #define for format. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add missing include Created 5 years, 3 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 | « runtime/vm/disassembler_x64.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index f20e055b79ee0918bbdcdd55147a6fb781941252..0c992e107299e90b5e28aabe6b28ebb5fd0192bd 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -896,10 +896,7 @@ void Isolate::BuildName(const char* name_prefix) {
name_ = strdup(name_prefix);
return;
}
- const char* kFormat = "%s-%lld";
- intptr_t len = OS::SNPrint(NULL, 0, kFormat, name_prefix, main_port()) + 1;
- name_ = reinterpret_cast<char*>(malloc(len));
- OS::SNPrint(name_, len, kFormat, name_prefix, main_port());
+ name_ = OS::SCreate(NULL, "%s-%" Pd64 "", name_prefix, main_port());
}
« no previous file with comments | « runtime/vm/disassembler_x64.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698