Filter out redundant packet context fields unless in verbose mode
[babeltrace.git] / formats / ctf-text / types / integer.c
index 1337eca3ab13df44bb89e7ee5903d381dd743a88..30209d6be6c66fbcad295273c947b2d14bfdeefe 100644 (file)
@@ -30,6 +30,9 @@ int ctf_text_integer_write(struct stream_pos *ppos, struct definition *definitio
                integer_definition->declaration;
        struct ctf_text_stream_pos *pos = ctf_text_pos(ppos);
 
+       if (!print_field(definition))
+               return 0;
+
        if (pos->dummy)
                return 0;
 
@@ -40,8 +43,9 @@ int ctf_text_integer_write(struct stream_pos *ppos, struct definition *definitio
                fprintf(pos->fp, "%s = ",
                        g_quark_to_string(definition->name));
 
-       if (integer_declaration->encoding == CTF_STRING_ASCII
-           || integer_declaration->encoding == CTF_STRING_UTF8) {
+       if (pos->string
+           && (integer_declaration->encoding == CTF_STRING_ASCII
+             || integer_declaration->encoding == CTF_STRING_UTF8)) {
 
                if (!integer_declaration->signedness) {
                        g_string_append_c(pos->string,
This page took 0.023849 seconds and 4 git commands to generate.