enumeration_field_type, value);
}
g_string_append(pretty->string, "( ");
- if (!iter) {
+ ret = bt_ctf_field_type_enumeration_mapping_iterator_next(iter);
+ if (ret) {
if (pretty->use_colors) {
g_string_append(pretty->string, COLOR_UNKNOWN);
}
}
iter = bt_ctf_field_enumeration_get_mappings(tag_field);
- if (!iter) {
+ iter_ret = bt_ctf_field_type_enumeration_mapping_iterator_next(
+ iter);
+ if (!iter || ret) {
bt_put(tag_field);
ret = BT_COMPONENT_STATUS_ERROR;
goto end;