From: Mathieu Desnoyers Date: Thu, 3 Aug 2017 13:35:12 +0000 (-0400) Subject: Fix: remove dead code X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=d4f9f0df90db44058835affbcaee15383e7c4258 Fix: remove dead code Found by Coverity: notnull: At condition event, the value of event cannot be NULL. dead_error_condition: The condition event must be true. CID 1376157 (#1 of 1): Logically dead code (DEADCODE)dead_error_line: Execution cannot reach the expression NULL inside this statement: event_class = (event ? bt_g... Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- diff --git a/lib/ctf-ir/event.c b/lib/ctf-ir/event.c index b8a85ce1..cb1d9c86 100644 --- a/lib/ctf-ir/event.c +++ b/lib/ctf-ir/event.c @@ -284,8 +284,7 @@ struct bt_ctf_event_class *bt_ctf_event_get_class(struct bt_ctf_event *event) goto end; } - event_class = event ? bt_get(bt_ctf_event_borrow_event_class(event)) : - NULL; + event_class = bt_get(bt_ctf_event_borrow_event_class(event)); end: return event_class; }