From 8b8dc96e023c365461d2407a3bf2220779bc7d05 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 27 Mar 2012 20:20:35 -0400 Subject: [PATCH 1/1] Cleanup: Remove unneeded local variables from function Reported-by: Yannick Brosseau Signed-off-by: Mathieu Desnoyers --- formats/ctf/events.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/formats/ctf/events.c b/formats/ctf/events.c index be90d841..15882eef 100644 --- a/formats/ctf/events.c +++ b/formats/ctf/events.c @@ -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; -- 2.34.1