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)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 13 Jun 2019 21:24:21 +0000 (17:24 -0400)
commitf873b2e6b14c2919d045b005189b8e1335b32447
tree9bffb8d0dd5e36255a5f488fdb374ae9733f3485
parent1ec75dfadc5f83114aa3eb9938555d30d09b9175
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.039452 seconds and 4 git commands to generate.