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

Unified Diff: base/debug/trace_event_impl.cc

Issue 9307114: Coverity: Initialize member variables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win fix. Created 8 years, 10 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
Index: base/debug/trace_event_impl.cc
diff --git a/base/debug/trace_event_impl.cc b/base/debug/trace_event_impl.cc
index 223e04bc3b0f21c34df0d600ad91e35fadf4daa7..e122d875439e4615f1a5346e52e802915d073e07 100644
--- a/base/debug/trace_event_impl.cc
+++ b/base/debug/trace_event_impl.cc
@@ -145,8 +145,8 @@ TraceEvent::TraceEvent()
thread_id_(0),
phase_(TRACE_EVENT_PHASE_BEGIN),
flags_(0) {
- arg_names_[0] = NULL;
- arg_names_[1] = NULL;
+ memset(arg_names_, 0, sizeof(arg_names_));
groby-ooo-7-16 2012/02/06 18:39:48 Technically, the old way was OK - those are both s
James Hawkins 2012/02/07 21:09:21 You're right, and Coverity wasn't even complaining
+ memset(arg_values_, 0, sizeof(arg_values_));
}
TraceEvent::TraceEvent(int thread_id,

Powered by Google App Engine
This is Rietveld 408576698