X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=formats%2Fctf-text%2Ftypes%2Fenum.c;h=381491a4dc81e68560ac6c1467c4b107b339d6af;hb=c6e183c2bacc6ee12b0545ef47fb41b63686d8c8;hp=0cb902180b3254597cc1237f9fc106e45a3ef287;hpb=d63ca2cd2249356c28a63653d30c681e9a7ce249;p=babeltrace.git diff --git a/formats/ctf-text/types/enum.c b/formats/ctf-text/types/enum.c index 0cb90218..381491a4 100644 --- a/formats/ctf-text/types/enum.c +++ b/formats/ctf-text/types/enum.c @@ -33,10 +33,9 @@ int ctf_text_enum_write(struct stream_pos *ppos, struct definition *definition) if (pos->dummy) return 0; - if (definition->index != 0 && definition->index != INT_MAX) + if (pos->field_nr++ != 0) fprintf(pos->fp, ","); - if (definition->index != INT_MAX) - fprintf(pos->fp, " "); + fprintf(pos->fp, " "); if (pos->print_names) fprintf(pos->fp, "%s = ", g_quark_to_string(definition->name));