From: Philippe Proulx Date: Wed, 14 Aug 2019 00:15:01 +0000 (-0400) Subject: sink.text.details: use write_none_prop_value() for empty array fields X-Git-Tag: v2.0.0-rc1~274 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=423fc6f7d2b3d05207c8c79bd10b620bf98740f8 sink.text.details: use write_none_prop_value() for empty array fields Signed-off-by: Philippe Proulx Change-Id: I6d6eb3575f0fa4f77096d1def57d46b5e5c40b48 Reviewed-on: https://review.lttng.org/c/babeltrace/+/1917 Tested-by: jenkins Reviewed-by: Francis Deslauriers --- diff --git a/src/plugins/text/details/write.c b/src/plugins/text/details/write.c index fa150b6a..6cc94285 100644 --- a/src/plugins/text/details/write.c +++ b/src/plugins/text/details/write.c @@ -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);