Move to kernel style SPDX license identifiers
[babeltrace.git] / src / plugins / common / muxing / muxing.c
index 15e9427d6c17e2c73046f8b7e6a86f74362ef9f4..4675e6e0dbe294acfdf82b9d69d7de0965bb8281 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>
@@ -27,6 +11,7 @@
 #include <string.h>
 
 #include "common/assert.h"
+#include "common/common.h"
 #include "common/macros.h"
 #include "common/uuid.h"
 
@@ -74,7 +59,7 @@ int message_type_weight(const bt_message_type msg_type)
                weight = 0;
                break;
        default:
-               abort();
+               bt_common_abort();
        }
 
        return weight;
@@ -460,7 +445,7 @@ const bt_stream *borrow_stream(const bt_message *msg)
        case BT_MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY:
                goto end;
        default:
-               abort();
+               bt_common_abort();
        }
 
 end:
@@ -819,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);
@@ -832,7 +817,7 @@ int compare_messages_same_type(struct messages_to_compare *msgs)
                break;
        }
        default:
-               abort();
+               bt_common_abort();
        }
 
 end:
@@ -856,14 +841,14 @@ int common_muxing_compare_messages(const bt_message *left_msg,
        msgs.right.trace = borrow_trace(right_msg);
        msgs.right.stream = borrow_stream(right_msg);
 
-       /* Same timestamp: compare trace names. */
-       ret = compare_messages_by_trace_name(&msgs);
+       /* Same timestamp: compare trace UUIDs. */
+       ret = compare_messages_by_trace_uuid(&msgs);
        if (ret) {
                goto end;
        }
 
-       /* Same timestamp and trace name: compare trace UUIDs. */
-       ret = compare_messages_by_trace_uuid(&msgs);
+       /* Same timestamp and trace UUID: compare trace names. */
+       ret = compare_messages_by_trace_name(&msgs);
        if (ret) {
                goto end;
        }
This page took 0.025454 seconds and 4 git commands to generate.