X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=formats%2Fctf%2Fmetadata%2Fctf-visitor-xml.c;h=c47bd27d8ed61ae0c64bf3f7939f443b239fdfd2;hb=7c7835b045c7457dc13ac83a7af1b1c1df5843cb;hp=49fa992817906dfd66d93d14b33b1de3794f9a42;hpb=64fa3fec6c28f1d077812b4bfa06ae73b0f5999d;p=babeltrace.git
diff --git a/formats/ctf/metadata/ctf-visitor-xml.c b/formats/ctf/metadata/ctf-visitor-xml.c
index 49fa9928..c47bd27d 100644
--- a/formats/ctf/metadata/ctf-visitor-xml.c
+++ b/formats/ctf/metadata/ctf-visitor-xml.c
@@ -313,7 +313,12 @@ int ctf_visitor_print_type_declarator(FILE *fd, int depth, struct ctf_node *node
print_tabs(fd, depth);
fprintf(fd, "\n");
}
- if (!cds_list_empty(&node->u.type_declarator.u.nested.length)) {
+ if (node->u.type_declarator.u.nested.abstract_array) {
+ print_tabs(fd, depth);
+ fprintf(fd, "\n");
+ print_tabs(fd, depth);
+ fprintf(fd, "\n");
+ } else if (!cds_list_empty(&node->u.type_declarator.u.nested.length)) {
print_tabs(fd, depth);
fprintf(fd, "\n");
cds_list_for_each_entry(iter, &node->u.type_declarator.u.nested.length,
@@ -325,12 +330,6 @@ int ctf_visitor_print_type_declarator(FILE *fd, int depth, struct ctf_node *node
print_tabs(fd, depth);
fprintf(fd, "\n");
}
- if (node->u.type_declarator.u.nested.abstract_array) {
- print_tabs(fd, depth);
- fprintf(fd, "\n");
- print_tabs(fd, depth);
- fprintf(fd, "\n");
- }
if (node->u.type_declarator.bitfield_len) {
print_tabs(fd, depth);
fprintf(fd, "\n");