Fix: remove dead code
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 3 Aug 2017 13:35:12 +0000 (09:35 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 9 Aug 2017 19:48:15 +0000 (15:48 -0400)
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 <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
lib/ctf-ir/event.c

index b8a85ce126456bb00d26739a13dab2a8856ac9ac..cb1d9c86ce4bfc9ca32b19767ed96194d92d884b 100644 (file)
@@ -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;
 }
This page took 0.024325 seconds and 4 git commands to generate.