{
struct bt_ctf_event_class *event_class;
- /*
- * Don't call put() on the stream class. See comment in
- * bt_ctf_event_class_set_stream_class for explanation.
- */
event_class = container_of(obj, struct bt_ctf_event_class, base);
bt_ctf_attributes_destroy(event_class->attributes);
bt_put(event_class->context);
return;
}
+ assert(byte_order == 0 || byte_order == LITTLE_ENDIAN ||
+ byte_order == BIG_ENDIAN);
+
bt_ctf_field_type_set_native_byte_order(event_class->context,
byte_order);
bt_ctf_field_type_set_native_byte_order(event_class->fields,
timestamp_field_type);
bt_put(timestamp_field_type);
if (mapped_clock) {
- uint64_t timestamp = bt_ctf_clock_get_time(
- mapped_clock);
+ int64_t timestamp;
+ ret = bt_ctf_clock_get_time(mapped_clock, ×tamp);
bt_put(mapped_clock);
- if (timestamp == (uint64_t) -1ULL) {
+ if (ret) {
goto end;
}