Move list.h to babeltrace/ include directory
[babeltrace.git] / formats / ctf / metadata / ctf-visitor-xml.c
index 22829d9b47401ab1132cfcf0465fb113267bdce4..a4d8549f280aa22a3ee116ad54a568b9cb6d245c 100644 (file)
@@ -21,9 +21,9 @@
 #include <string.h>
 #include <stdlib.h>
 #include <assert.h>
-#include <helpers/list.h>
 #include <glib.h>
 #include <errno.h>
+#include <babeltrace/list.h>
 #include "ctf-scanner.h"
 #include "ctf-parser.h"
 #include "ctf-ast.h"
@@ -192,10 +192,12 @@ int ctf_visitor_print_type_declarator(FILE *fd, int depth, struct ctf_node *node
 
        switch (node->u.type_declarator.type) {
        case TYPEDEC_ID:
-               print_tabs(fd, depth);
-               fprintf(fd, "<id \"");
-               fprintf(fd, "%s", node->u.type_declarator.u.id);
-               fprintf(fd, "\" />\n");
+               if (node->u.type_declarator.u.id) {
+                       print_tabs(fd, depth);
+                       fprintf(fd, "<id \"");
+                       fprintf(fd, "%s", node->u.type_declarator.u.id);
+                       fprintf(fd, "\" />\n");
+               }
                break;
        case TYPEDEC_NESTED:
                if (node->u.type_declarator.u.nested.type_declarator) {
This page took 0.023202 seconds and 4 git commands to generate.