Index: runtime/vm/debugger.cc |
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc |
index 6c0a2d069274e26e82b17c12807065496abd41e4..c4a6a15f48a3517c6e12b51f53003b3668daaa3f 100644 |
--- a/runtime/vm/debugger.cc |
+++ b/runtime/vm/debugger.cc |
@@ -418,18 +418,10 @@ const char* Debugger::QualifiedFunctionName(const Function& func) { |
Class& func_class = Class::Handle(func.Owner()); |
String& class_name = String::Handle(func_class.Name()); |
- const char* kFormat = "%s%s%s"; |
- intptr_t len = OS::SNPrint(NULL, 0, kFormat, |
- func_class.IsTopLevel() ? "" : class_name.ToCString(), |
- func_class.IsTopLevel() ? "" : ".", |
- func_name.ToCString()); |
- len++; // String terminator. |
- char* chars = Thread::Current()->zone()->Alloc<char>(len); |
- OS::SNPrint(chars, len, kFormat, |
- func_class.IsTopLevel() ? "" : class_name.ToCString(), |
+ return OS::SCreate(Thread::Current()->zone(), |
+ "%s%s%s", func_class.IsTopLevel() ? "" : class_name.ToCString(), |
func_class.IsTopLevel() ? "" : ".", |
func_name.ToCString()); |
- return chars; |
} |