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

Unified Diff: runtime/vm/stack_frame_test.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/snapshot.cc ('k') | runtime/vm/timeline.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stack_frame_test.cc
diff --git a/runtime/vm/stack_frame_test.cc b/runtime/vm/stack_frame_test.cc
index 426ede7941ffca93ce17712d3daea40db621e633..c5f280aa33afa005a042de11ba9ca3860cee14ed 100644
--- a/runtime/vm/stack_frame_test.cc
+++ b/runtime/vm/stack_frame_test.cc
@@ -101,10 +101,8 @@ void FUNCTION_NAME(StackFrame_validateFrame)(Dart_NativeArguments args) {
const Library& lib = Library::Handle(Library::LookupLibrary(url));
ASSERT(!lib.IsNull());
const char* lib_name = String::Handle(lib.url()).ToCString();
- intptr_t length = OS::SNPrint(NULL, 0, "%s_%s", lib_name, expected_name);
- char* full_name = Thread::Current()->zone()->Alloc<char>(length + 1);
- ASSERT(full_name != NULL);
- OS::SNPrint(full_name, (length + 1), "%s_%s", lib_name, expected_name);
+ char* full_name = OS::SCreate(Thread::Current()->zone(),
+ "%s_%s", lib_name, expected_name);
if (strcmp(full_name, name) != 0) {
FATAL("StackFrame_validateFrame fails, incorrect frame.\n");
}
« no previous file with comments | « runtime/vm/snapshot.cc ('k') | runtime/vm/timeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698