Remove extra space in pretty print
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 9 May 2011 18:51:44 +0000 (14:51 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 9 May 2011 18:51:44 +0000 (14:51 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf-text/types/struct.c

index 7dd17e04111db0ee6ccfbcf735746abce9209640..3a69994fae5746ebcec45c81abc88dfcedfa870c 100644 (file)
@@ -33,7 +33,8 @@ int ctf_text_struct_write(struct stream_pos *ppos, struct definition *definition
                if (pos->depth >= 0) {
                        if (pos->field_nr++ != 0)
                                fprintf(pos->fp, ",");
                if (pos->depth >= 0) {
                        if (pos->field_nr++ != 0)
                                fprintf(pos->fp, ",");
-                       fprintf(pos->fp, " ");
+                       if (pos->print_names || len > 1)
+                               fprintf(pos->fp, " ");
                        if (pos->print_names && definition->name != 0)
                                fprintf(pos->fp, "%s = ",
                                        g_quark_to_string(definition->name));
                        if (pos->print_names && definition->name != 0)
                                fprintf(pos->fp, "%s = ",
                                        g_quark_to_string(definition->name));
This page took 0.024315 seconds and 4 git commands to generate.