Fix: sink.text.pretty: comma in enum fields
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 27 May 2019 18:50:19 +0000 (14:50 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 5 Jun 2019 17:47:34 +0000 (13:47 -0400)
commit55c68a1a729551ca7d697d6e771064a06a19c206
treef53356dc7e8b69d11cfc7e829f0d8ee88e1089cc
parentb4c499ed5193e3cb2ef1fcd290e90a3667c6230a
Fix: sink.text.pretty: comma in enum fields

The condition for printing commas that separate labels of enum fields is
reversed.  It causes a comma tu be spuriously printed before the first
label:

  enumfield = ( , "zero" : container = 0 )

instead of:

  enumfield = ( "zero" : container = 0 )

With multiple matching labels, before:

  enumfield = ( , "zero""one" : container = 0 )

and after:

  enumfield = ( "zero", "one" : container = 0

Change-Id: I03452b8ece4f97bf0c819f6885ef512f7ddc31e6
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1334
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
plugins/text/pretty/print.c
This page took 0.024467 seconds and 4 git commands to generate.