X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf-text%2Fctf-text.c;h=0fc456ad7152bd3a7aede7f1da6ca2c5b53ce5cb;hp=afdc07c1d80576c367743e0e49a25e98c5fe17aa;hb=49928fe40aa3dc45d3661e556c0192ae4a2af43a;hpb=458af89d3baff393a4c38f70520fb51b811ad932 diff --git a/formats/ctf-text/ctf-text.c b/formats/ctf-text/ctf-text.c index afdc07c1..0fc456ad 100644 --- a/formats/ctf-text/ctf-text.c +++ b/formats/ctf-text/ctf-text.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include @@ -342,6 +342,8 @@ int ctf_text_write_event(struct bt_stream_pos *ppos, struct ctf_stream_definitio set_field_names_print(pos, ITEM_HEADER); if (pos->print_names) { fprintf(pos->fp, "trace:domain = "); + } else if (dom_print) { + fprintf(pos->fp, ":"); } fprintf(pos->fp, "%s", stream_class->trace->env.domain); if (pos->print_names) @@ -547,6 +549,10 @@ struct bt_trace_descriptor *ctf_text_open_trace(const char *path, int flags, FILE *fp; pos = g_new0(struct ctf_text_stream_pos, 1); + if (!pos) { + goto error; + } + init_trace_descriptor(&pos->trace_descriptor); pos->last_real_timestamp = -1ULL; pos->last_cycles_timestamp = -1ULL;