/*
- * 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>
#include <string.h>
#include "common/assert.h"
+#include "common/common.h"
#include "common/macros.h"
#include "common/uuid.h"
weight = 0;
break;
default:
- abort();
+ bt_common_abort();
}
return weight;
case BT_MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY:
goto end;
default:
- abort();
+ bt_common_abort();
}
end:
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);
break;
}
default:
- abort();
+ bt_common_abort();
}
end:
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;
}