From 1530e4060d7afb862a2c1df2436e3104fbf1279d Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 9 Jun 2017 17:41:53 -0400 Subject: [PATCH] Fix: event, stream names can be strings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The code is too strict and enforces that they need to be CTF identifiers, but it's valid to have those as simple strings. Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- lib/ctf-ir/event-class.c | 6 ------ lib/ctf-ir/stream-class.c | 6 ------ 2 files changed, 12 deletions(-) diff --git a/lib/ctf-ir/event-class.c b/lib/ctf-ir/event-class.c index 9f82e176..67cb1575 100644 --- a/lib/ctf-ir/event-class.c +++ b/lib/ctf-ir/event-class.c @@ -59,12 +59,6 @@ struct bt_ctf_event_class *bt_ctf_event_class_create(const char *name) 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."); diff --git a/lib/ctf-ir/stream-class.c b/lib/ctf-ir/stream-class.c index 52be6fcd..9b167560 100644 --- a/lib/ctf-ir/stream-class.c +++ b/lib/ctf-ir/stream-class.c @@ -97,12 +97,6 @@ struct bt_ctf_stream_class *bt_ctf_stream_class_create_empty(const char *name) BT_LOGD("Creating empty stream class object: name=\"%s\"", name); - if (name && bt_ctf_validate_identifier(name)) { - BT_LOGW("Invalid parameter: stream class's name is not a valid CTF identifier: " - "name=\"%s\"", name); - goto error; - } - stream_class = g_new0(struct bt_ctf_stream_class, 1); if (!stream_class) { BT_LOGE_STR("Failed to allocate one stream class."); -- 2.34.1