Fix typos
[babeltrace.git] / src / plugins / common / muxing / muxing.c
index 93ba1a34e00cb25f48d5a432f664f10dbd3b6335..e15d1f6877ad2b16829348598361f12081261c48 100644 (file)
@@ -1,23 +1,7 @@
 /*
- * Copyright 2019 Francis Deslauriers <francis.deslauriers@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:
+ * SPDX-License-Identifier: MIT
  *
- * 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.
+ * Copyright 2019 Francis Deslauriers <francis.deslauriers@efficios.com>
  */
 
 #include <babeltrace2/babeltrace.h>
@@ -82,10 +66,10 @@ int message_type_weight(const bt_message_type msg_type)
 }
 
 /*
- * Compare 2 messages to order them in a determinitic way based on their
+ * Compare 2 messages to order them in a deterministic way based on their
  * types.
- * Returns -1 is left mesage must go first
- * Returns 1 is right mesage must go first
+ * Returns -1 is left message must go first
+ * Returns 1 is right message must go first
  */
 static
 int compare_messages_by_type(struct messages_to_compare *msgs)
@@ -189,7 +173,7 @@ int compare_streams(const bt_stream *left_stream, const bt_stream *right_stream)
         * No need to compare stream id as it was checked earlier and if we are
         * here it means they are identical or both absent.
         */
-       BT_ASSERT(bt_stream_get_id(left_stream) ==
+       BT_ASSERT_DBG(bt_stream_get_id(left_stream) ==
                bt_stream_get_id(right_stream));
 
        /* Compare stream name. */
@@ -216,7 +200,7 @@ int compare_streams(const bt_stream *left_stream, const bt_stream *right_stream)
         * No need to compare stream class id as it was checked earlier and if
         * we are here it means they are identical.
         */
-       BT_ASSERT(bt_stream_class_get_id(left_stream_class) ==
+       BT_ASSERT_DBG(bt_stream_class_get_id(left_stream_class) ==
                bt_stream_class_get_id(right_stream_class));
 
        /* Compare stream class name. */
@@ -652,7 +636,7 @@ int compare_messages_same_type(struct messages_to_compare *msgs)
         * Both messages are of the same type, we must compare characterics of
         * the messages such as the attributes of the event in a event message.
         */
-       BT_ASSERT(bt_message_get_type(msgs->left.msg) ==
+       BT_ASSERT_DBG(bt_message_get_type(msgs->left.msg) ==
                bt_message_get_type(msgs->right.msg));
 
        switch (bt_message_get_type(msgs->left.msg)) {
@@ -820,9 +804,9 @@ int compare_messages_same_type(struct messages_to_compare *msgs)
        case BT_MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY:
        {
                const bt_clock_snapshot *left_cs =
-                       bt_message_message_iterator_inactivity_borrow_default_clock_snapshot_const(msgs->left.msg);
+                       bt_message_message_iterator_inactivity_borrow_clock_snapshot_const(msgs->left.msg);
                const bt_clock_snapshot *right_cs =
-                       bt_message_message_iterator_inactivity_borrow_default_clock_snapshot_const(msgs->right.msg);
+                       bt_message_message_iterator_inactivity_borrow_clock_snapshot_const(msgs->right.msg);
 
                ret = compare_clock_snapshots_and_clock_classes(
                        left_cs, right_cs);
@@ -840,14 +824,13 @@ end:
        return ret;
 }
 
-BT_HIDDEN
 int common_muxing_compare_messages(const bt_message *left_msg,
                const bt_message *right_msg)
 {
        int ret = 0;
        struct messages_to_compare msgs;
 
-       BT_ASSERT(left_msg != right_msg);
+       BT_ASSERT_DBG(left_msg != right_msg);
 
        msgs.left.msg = left_msg;
        msgs.left.trace = borrow_trace(left_msg);
This page took 0.025738 seconds and 4 git commands to generate.