Tests: Test CTF-IR event-field's getters
[babeltrace.git] / formats / ctf / ir / event-fields.c
index 973c9bdd395338bbc5370355393dd61a374fd85c..92385869c2bbe6661429aa9e5c48f77fbc6ad582 100644 (file)
@@ -269,6 +269,7 @@ int bt_ctf_field_sequence_set_length(struct bt_ctf_field *field,
 
        length_type = container_of(length_field->type,
                struct bt_ctf_field_type_integer, parent);
+       /* The length field must be unsigned */
        if (length_type->declaration.signedness) {
                ret = -1;
                goto end;
@@ -612,7 +613,7 @@ const char *bt_ctf_field_enumeration_get_mapping_name(
        enumeration_type = container_of(field->type,
                struct bt_ctf_field_type_enumeration, parent);
 
-       if (integer_type->declaration.signedness) {
+       if (!integer_type->declaration.signedness) {
                uint64_t value;
                ret = bt_ctf_field_unsigned_integer_get_value(container,
                      &value);
This page took 0.023796 seconds and 4 git commands to generate.