X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=lib%2Fctf-ir%2Futils.c;h=8690f0255385bb2cc4204a7a7f1a01713ae1ac88;hb=2a3ced3c38855ea18eb9b29e58563a7301b98216;hp=fba66fd5af7141c399e4097e310cf937f671aa7d;hpb=4a2fffdb3c120ac5f16d4308b2da375fbe9def20;p=babeltrace.git diff --git a/lib/ctf-ir/utils.c b/lib/ctf-ir/utils.c index fba66fd5..8690f025 100644 --- a/lib/ctf-ir/utils.c +++ b/lib/ctf-ir/utils.c @@ -34,6 +34,7 @@ #include #include #include +#include #include static @@ -130,7 +131,11 @@ int bt_validate_single_clock_class(struct bt_field_type *field_type, struct bt_clock_class **expected_clock_class) { int ret = 0; - assert(field_type); + + if (!field_type) { + goto end; + } + assert(expected_clock_class); switch (bt_field_type_get_type_id(field_type)) { @@ -155,9 +160,13 @@ int bt_validate_single_clock_class(struct bt_field_type *field_type, BT_LOGW("Integer field type is not mapped to " "the expected clock class: " "mapped-clock-class-addr=%p, " - "expected-clock-class-addr=%p", + "mapped-clock-class-name=\"%s\", " + "expected-clock-class-addr=%p, " + "expected-clock-class-name=\"%s\"", mapped_clock_class, - *expected_clock_class); + bt_clock_class_get_name(mapped_clock_class), + *expected_clock_class, + bt_clock_class_get_name(*expected_clock_class)); bt_put(mapped_clock_class); ret = -1; goto end;