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()); |
} |