BT_LOGD("Creating event class object: name=\"%s\"",
name);
- if (bt_ctf_validate_identifier(name)) {
- BT_LOGW("Invalid parameter: event class's name is not a valid CTF identifier: "
- "name=\"%s\"", name);
- goto error;
- }
-
event_class = g_new0(struct bt_ctf_event_class, 1);
if (!event_class) {
BT_LOGE_STR("Failed to allocate one event class.");
goto error;
}
- event_class->context = bt_ctf_field_type_structure_create();
- if (!event_class->context) {
- BT_LOGE_STR("Cannot create event class's initial context field type object.");
- goto error;
- }
-
event_class->attributes = bt_ctf_attributes_create();
if (!event_class->attributes) {
BT_LOGE_STR("Cannot create event class's attributes object.");