Index: runtime/vm/profiler_service.cc |
diff --git a/runtime/vm/profiler_service.cc b/runtime/vm/profiler_service.cc |
index 40b7bdc249a9739c82fe1ff4cfcd2369be4aa534..a4e6b835ce7a6fdda2704a892a7588a8ff677145 100644 |
--- a/runtime/vm/profiler_service.cc |
+++ b/runtime/vm/profiler_service.cc |
@@ -253,9 +253,9 @@ void ProfileCode::SetName(const char* name) { |
name_ = NULL; |
} |
intptr_t len = strlen(name); |
- name_ = Thread::Current()->zone()->Alloc<const char>(len + 1); |
- strncpy(const_cast<char*>(name_), name, len); |
- const_cast<char*>(name_)[len] = '\0'; |
+ name_ = Thread::Current()->zone()->Alloc<char>(len + 1); |
+ strncpy(name_, name, len); |
+ name_[len] = '\0'; |
} |