projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace assert() -> BT_ASSERT() and some preconditions with BT_ASSERT_PRE()
[babeltrace.git]
/
lib
/
ctf-ir
/
clock-class.c
diff --git
a/lib/ctf-ir/clock-class.c
b/lib/ctf-ir/clock-class.c
index 730f8f34dab53f98f2d677a112ec89d37b79ee8f..990cb08e7d5dffa221553b73d70811b89c908137 100644
(file)
--- a/
lib/ctf-ir/clock-class.c
+++ b/
lib/ctf-ir/clock-class.c
@@
-39,6
+39,7
@@
#include <babeltrace/compat/string-internal.h>
#include <inttypes.h>
#include <babeltrace/object-internal.h>
#include <babeltrace/compat/string-internal.h>
#include <inttypes.h>
#include <babeltrace/object-internal.h>
+#include <babeltrace/assert-internal.h>
static
void bt_clock_class_destroy(struct bt_object *obj);
static
void bt_clock_class_destroy(struct bt_object *obj);
@@
-668,7
+669,7
@@
void set_ns_from_epoch(struct bt_clock_value *clock_value)
}
s_ns = (int64_t) u_ns;
}
s_ns = (int64_t) u_ns;
-
assert
(s_ns >= 0);
+
BT_ASSERT
(s_ns >= 0);
if (clock_class->offset < 0) {
if (clock_value->ns_from_epoch >= 0) {
if (clock_class->offset < 0) {
if (clock_value->ns_from_epoch >= 0) {
@@
-731,7
+732,7
@@
offset_ok:
}
s_ns = (int64_t) u_ns;
}
s_ns = (int64_t) u_ns;
-
assert
(s_ns >= 0);
+
BT_ASSERT
(s_ns >= 0);
/* Clock value (cycles) is always positive */
if (clock_value->ns_from_epoch <= 0) {
/* Clock value (cycles) is always positive */
if (clock_value->ns_from_epoch <= 0) {
@@
-865,8
+866,8
@@
int bt_clock_class_compare(struct bt_clock_class *clock_class_a,
struct bt_clock_class *clock_class_b)
{
int ret = 1;
struct bt_clock_class *clock_class_b)
{
int ret = 1;
-
assert
(clock_class_a);
-
assert
(clock_class_b);
+
BT_ASSERT
(clock_class_a);
+
BT_ASSERT
(clock_class_b);
/* Name */
if (strcmp(clock_class_a->name->str, clock_class_b->name->str) != 0) {
/* Name */
if (strcmp(clock_class_a->name->str, clock_class_b->name->str) != 0) {
This page took
0.026779 seconds
and
4
git commands to generate.