prettify output
[babeltrace.git] / formats / ctf / metadata / ctf-visitor-xml.c
index d1c0751c51e3c8c548144c087cd1834c05d6fa52..f73c367193c4030d585b9d4fe16643f5687803a1 100644 (file)
@@ -24,6 +24,7 @@
 #include <glib.h>
 #include <inttypes.h>
 #include <errno.h>
+#include <babeltrace/babeltrace.h>
 #include <babeltrace/list.h>
 #include "ctf-scanner.h"
 #include "ctf-parser.h"
@@ -609,12 +610,9 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
                if (node->u._enum.container_type) {
                        print_tabs(fd, depth);
                        fprintf(fd, "<container_type>\n");
-               }
-
-               ret = ctf_visitor_print_xml(fd, depth + 1, node->u._enum.container_type);
-               if (ret)
-                       return ret;
-               if (node->u._enum.container_type) {
+                       ret = ctf_visitor_print_xml(fd, depth + 1, node->u._enum.container_type);
+                       if (ret)
+                               return ret;
                        print_tabs(fd, depth);
                        fprintf(fd, "</container_type>\n");
                }
This page took 0.023215 seconds and 4 git commands to generate.