Rename ctf_event to ctf_event_declaration
[babeltrace.git] / formats / ctf / events.c
index be90d841acbcc5bc05fbc6a6bf1dda2423a15008..71665ce01442aeadf3af2d276014eb797faf1b46 100644 (file)
@@ -140,8 +140,8 @@ const struct definition *bt_ctf_get_index(const struct bt_ctf_event *event,
 
 const char *bt_ctf_event_name(const struct bt_ctf_event *event)
 {
-       struct ctf_event *event_class;
-       struct ctf_stream_class *stream_class;
+       struct ctf_event_declaration *event_class;
+       struct ctf_stream_declaration *stream_class;
 
        if (!event)
                return NULL;
@@ -255,16 +255,11 @@ struct bt_context *bt_ctf_event_get_context(const struct bt_ctf_event *event)
 {
        struct bt_context *ret = NULL;
        struct ctf_file_stream *cfs;
-       struct ctf_stream *stream;
-       struct ctf_stream_class *stream_class;
        struct ctf_trace *trace;
 
        cfs = container_of(event->stream, struct ctf_file_stream,
                        parent);
-       stream = &cfs->parent;
-       stream_class = stream->stream_class;
-       trace = stream_class->trace;
-
+       trace = cfs->parent.stream_class->trace;
        if (trace->ctx)
                ret = trace->ctx;
 
@@ -275,16 +270,11 @@ int bt_ctf_event_get_handle_id(const struct bt_ctf_event *event)
 {
        int ret = -1;
        struct ctf_file_stream *cfs;
-       struct ctf_stream *stream;
-       struct ctf_stream_class *stream_class;
        struct ctf_trace *trace;
 
        cfs = container_of(event->stream, struct ctf_file_stream,
                        parent);
-       stream = &cfs->parent;
-       stream_class = stream->stream_class;
-       trace = stream_class->trace;
-
+       trace = cfs->parent.stream_class->trace;
        if (trace->handle)
                ret = trace->handle->id;
 
This page took 0.023431 seconds and 4 git commands to generate.