From d4f9f0df90db44058835affbcaee15383e7c4258 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 3 Aug 2017 09:35:12 -0400 Subject: [PATCH] Fix: remove dead code MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- lib/ctf-ir/event.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; } -- 2.34.1