aboutsummaryrefslogtreecommitdiff
path: root/cli/mmcli-output.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2019-12-02 12:27:19 +0100
committerAleksander Morgado <aleksander@aleksander.es>2019-12-02 11:29:26 +0000
commit9e785e145f4f48907bee9d350aae2961037b3a23 (patch)
tree818864399e816f05d4b83efe97eebb2ed799d067 /cli/mmcli-output.c
parenta28f88b6846b352b055ed692082542e5c459c400 (diff)
mmcli,output: skip printing empty value lists
E.g. we shouldn't print emergency numbers field if there is none available: $ mmcli -i 0 ------------------------------- General | dbus path: /org/freedesktop/ModemManager1/SIM/0 ------------------------------- Properties | imsi: 901700000026890 | iccid: 8988211000000268907 | operator id: 90170 | operator name: 901 70 | emergency numbers:
Diffstat (limited to 'cli/mmcli-output.c')
-rw-r--r--cli/mmcli-output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/mmcli-output.c b/cli/mmcli-output.c
index c72af513..62a7a6fb 100644
--- a/cli/mmcli-output.c
+++ b/cli/mmcli-output.c
@@ -824,7 +824,7 @@ dump_output_human (void)
/* Ignore items without a value set */
if ((single && (!single->value || !single->value[0])) ||
- (multiple && !multiple->values))
+ (multiple && (!multiple->values || !g_strv_length (multiple->values))))
continue;
/* Section change? */