iter = bt_ctf_field_type_enumeration_find_mappings_by_unsigned_value(
enumeration_field_type, value);
}
+ g_string_append(pretty->string, "( ");
if (!iter) {
- ret = BT_COMPONENT_STATUS_ERROR;
- goto end;
+ if (pretty->use_colors) {
+ g_string_append(pretty->string, COLOR_UNKNOWN);
+ }
+ g_string_append(pretty->string, "<unknown>");
+ if (pretty->use_colors) {
+ g_string_append(pretty->string, COLOR_RST);
+ }
+ goto skip_loop;
}
- g_string_append(pretty->string, "( ");
for (;;) {
const char *mapping_name;
break;
}
}
- if (!nr_mappings) {
- if (pretty->use_colors) {
- g_string_append(pretty->string, COLOR_UNKNOWN);
- }
- g_string_append(pretty->string, "<unknown>");
- if (pretty->use_colors) {
- g_string_append(pretty->string, COLOR_RST);
- }
- }
+skip_loop:
g_string_append(pretty->string, " : container = ");
ret = print_integer(pretty, container_field);
if (ret != BT_COMPONENT_STATUS_OK) {