sink.text.details: use write_none_prop_value() for empty array fields
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 14 Aug 2019 00:15:01 +0000 (20:15 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 4 Sep 2019 15:58:21 +0000 (11:58 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I6d6eb3575f0fa4f77096d1def57d46b5e5c40b48
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1917
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
src/plugins/text/details/write.c

index fa150b6abe6bfb54b438686d4aaf30bf6d1c1345..6cc9428591d32b43e14fc3f2f7f792cf0156b0c5 100644 (file)
@@ -1598,7 +1598,8 @@ void write_field(struct details_write_ctx *ctx, const bt_field *field,
 
                        decr_indent(ctx);
                } else {
-                       g_string_append(ctx->str, " Empty");
+                       write_sp(ctx);
+                       write_none_prop_value(ctx, "Empty");
                }
 
                break;
@@ -1609,7 +1610,8 @@ void write_field(struct details_write_ctx *ctx, const bt_field *field,
                uint64_t length = bt_field_array_get_length(field);
 
                if (length == 0) {
-                       g_string_append(ctx->str, " Empty");
+                       write_sp(ctx);
+                       write_none_prop_value(ctx, "Empty");
                } else {
                        g_string_append(ctx->str, " Length ");
                        write_uint_prop_value(ctx, length);
This page took 0.026145 seconds and 4 git commands to generate.