sink.ctf.fs: initialize structure fields
[babeltrace.git] / src / plugins / ctf / fs-sink / translate-trace-ir-to-ctf-ir.cpp
index 96884a162af12a366ecafb8ea32f5e2ee238d059..0a8e28dfdefe41e9880549b39084ff12405e342d 100644 (file)
@@ -40,20 +40,20 @@ namespace sink {
 
 struct TraceIrToCtfIrCtx
 {
-    bt_logging_level log_level;
-    bt_self_component *self_comp;
+    bt_logging_level log_level = BT_LOGGING_LEVEL_NONE;
+    bt_self_component *self_comp = nullptr;
 
     /* Weak */
-    struct fs_sink_ctf_stream_class *cur_sc;
+    struct fs_sink_ctf_stream_class *cur_sc = nullptr;
 
     /* Weak */
-    struct fs_sink_ctf_event_class *cur_ec;
+    struct fs_sink_ctf_event_class *cur_ec = nullptr;
 
-    bt_field_path_scope cur_scope;
+    bt_field_path_scope cur_scope = BT_FIELD_PATH_SCOPE_PACKET_CONTEXT;
 
     /*
      * Array of `struct field_path_elem` */
-    GArray *cur_path;
+    GArray *cur_path = nullptr;
 };
 
 } /* namespace sink */
@@ -1472,7 +1472,6 @@ end:
 
 static inline void ctx_init(ctf::sink::TraceIrToCtfIrCtx *ctx, struct fs_sink_comp *fs_sink)
 {
-    memset(ctx, 0, sizeof(*ctx));
     ctx->cur_path = g_array_new(FALSE, TRUE, sizeof(struct field_path_elem));
     BT_ASSERT(ctx->cur_path);
     ctx->log_level = fs_sink->log_level;
This page took 0.023791 seconds and 4 git commands to generate.