projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Enumeration mapping iterator's initial position is inconsistent
[babeltrace.git]
/
plugins
/
text
/
pretty
/
print.c
diff --git
a/plugins/text/pretty/print.c
b/plugins/text/pretty/print.c
index 75edcc7eed7541fa46354401ae597b8250d494b9..7234b8a485bbe4d94e4bbc3e37e6c5b3dd1a5535 100644
(file)
--- a/
plugins/text/pretty/print.c
+++ b/
plugins/text/pretty/print.c
@@
-838,7
+838,8
@@
enum bt_component_status print_enum(struct pretty_component *pretty,
enumeration_field_type, value);
}
g_string_append(pretty->string, "( ");
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);
}
if (pretty->use_colors) {
g_string_append(pretty->string, COLOR_UNKNOWN);
}
@@
-1243,7
+1244,9
@@
enum bt_component_status print_variant(struct pretty_component *pretty,
}
iter = bt_ctf_field_enumeration_get_mappings(tag_field);
}
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;
bt_put(tag_field);
ret = BT_COMPONENT_STATUS_ERROR;
goto end;
This page took
0.028108 seconds
and
4
git commands to generate.