- writer_clock_class = bt_ctf_trace_get_clock_class(writer_trace, 0);
- if (!writer_clock_class) {
- fprintf(err, "[error] %s in %s:%d\n",
- __func__, __FILE__, __LINE__);
- goto error;
- }
+ writer_clock_class = bt_ctf_trace_get_clock_class_by_index(writer_trace, 0);
+ assert(writer_clock_class);