Move to kernel style SPDX license identifiers
[babeltrace.git] / src / lib / trace-ir / event-class.c
index ba79f28b6ff7ca1eb5865f05e87b89216e04d426..67e4f3a5c97df4ddbcbe524fd95271b4e372bb26 100644 (file)
@@ -1,24 +1,8 @@
 /*
+ * SPDX-License-Identifier: MIT
+ *
  * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
  */
 
 #define BT_LOG_TAG "LIB/EVENT-CLASS"
@@ -27,7 +11,6 @@
 #include "lib/assert-pre.h"
 #include <babeltrace2/trace-ir/field-class.h>
 #include <babeltrace2/trace-ir/event-class.h>
-#include <babeltrace2/trace-ir/event-class-const.h>
 #include <babeltrace2/trace-ir/stream-class.h>
 #include "compat/compiler.h"
 #include "compat/endian.h"
@@ -178,6 +161,7 @@ end:
 struct bt_event_class *bt_event_class_create(
                struct bt_stream_class *stream_class)
 {
+       BT_ASSERT_PRE_NO_ERROR();
        BT_ASSERT_PRE_NON_NULL(stream_class, "Stream class");
        BT_ASSERT_PRE(stream_class->assigns_automatic_event_class_id,
                "Stream class does not automatically assigns event class IDs: "
@@ -189,6 +173,7 @@ struct bt_event_class *bt_event_class_create(
 struct bt_event_class *bt_event_class_create_with_id(
                struct bt_stream_class *stream_class, uint64_t id)
 {
+       BT_ASSERT_PRE_NO_ERROR();
        BT_ASSERT_PRE(!stream_class->assigns_automatic_event_class_id,
                "Stream class automatically assigns event class IDs: "
                "%![sc-]+S", stream_class);
@@ -204,6 +189,7 @@ const char *bt_event_class_get_name(const struct bt_event_class *event_class)
 enum bt_event_class_set_name_status bt_event_class_set_name(
                struct bt_event_class *event_class, const char *name)
 {
+       BT_ASSERT_PRE_NO_ERROR();
        BT_ASSERT_PRE_NON_NULL(event_class, "Event class");
        BT_ASSERT_PRE_NON_NULL(name, "Name");
        BT_ASSERT_PRE_DEV_EVENT_CLASS_HOT(event_class);
@@ -251,6 +237,7 @@ enum bt_event_class_set_emf_uri_status bt_event_class_set_emf_uri(
                struct bt_event_class *event_class,
                const char *emf_uri)
 {
+       BT_ASSERT_PRE_NO_ERROR();
        BT_ASSERT_PRE_NON_NULL(event_class, "Event class");
        BT_ASSERT_PRE_NON_NULL(emf_uri, "EMF URI");
        BT_ASSERT_PRE_DEV_EVENT_CLASS_HOT(event_class);
@@ -304,6 +291,7 @@ bt_event_class_set_specific_context_field_class(
                .event_payload = NULL,
        };
 
+       BT_ASSERT_PRE_NO_ERROR();
        BT_ASSERT_PRE_NON_NULL(event_class, "Event class");
        BT_ASSERT_PRE_NON_NULL(field_class, "Field class");
        BT_ASSERT_PRE_DEV_EVENT_CLASS_HOT(event_class);
@@ -368,6 +356,7 @@ bt_event_class_set_payload_field_class(
                .event_payload = field_class,
        };
 
+       BT_ASSERT_PRE_NO_ERROR();
        BT_ASSERT_PRE_NON_NULL(event_class, "Event class");
        BT_ASSERT_PRE_NON_NULL(field_class, "Field class");
        BT_ASSERT_PRE_DEV_EVENT_CLASS_HOT(event_class);
This page took 0.024747 seconds and 4 git commands to generate.