X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fctf-ir%2Ffield-types.c;h=feb7a62bc506db5b59fa526a6d824314677f1df0;hb=93dda9014cf4c4f5365a6af73594a543ec642cb9;hp=be3e2d0f5c9c54f13690384a79e739c86ef15665;hpb=1805e0b4b91b339a131f2463e241b706cad5a56f;p=babeltrace.git diff --git a/lib/ctf-ir/field-types.c b/lib/ctf-ir/field-types.c index be3e2d0f..feb7a62b 100644 --- a/lib/ctf-ir/field-types.c +++ b/lib/ctf-ir/field-types.c @@ -4743,17 +4743,26 @@ int bt_field_type_integer_compare(struct bt_field_type *type_a, goto end; } - /* Mapped clock */ - if (int_type_a->mapped_clock != int_type_b->mapped_clock) { - BT_LOGV("Integer field types differ: different mapped clock classes: " - "ft-a-mapped-clock-class-addr=%p, " - "ft-b-mapped-clock-class-addr=%p, " - "ft-a-mapped-clock-class-name=\"%s\", " - "ft-b-mapped-clock-class-name=\"%s\"", - int_type_a->mapped_clock, int_type_b->mapped_clock, - int_type_a->mapped_clock ? bt_clock_class_get_name(int_type_a->mapped_clock) : "", - int_type_b->mapped_clock ? bt_clock_class_get_name(int_type_b->mapped_clock) : ""); - goto end; + /* Mapped clock class */ + if (int_type_a->mapped_clock) { + if (!int_type_b->mapped_clock) { + BT_LOGV_STR("Integer field types differ: field type A " + "has a mapped clock class, but field type B " + "does not."); + goto end; + } + + if (bt_clock_class_compare(int_type_a->mapped_clock, + int_type_b->mapped_clock) != 0) { + BT_LOGV_STR("Integer field types differ: different " + "mapped clock classes."); + } + } else { + if (int_type_b->mapped_clock) { + BT_LOGV_STR("Integer field types differ: field type A " + "has no description, but field type B has one."); + goto end; + } } /* Equal */