diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index 1897a626d5601a1ac40db5f37f741e21681a9108..49de81af8c50b095062bcba0cefdc01c767a93f3 100644 --- a/tools/virsh-domain-monitor.c +++ b/tools/virsh-domain-monitor.c @@ -643,11 +643,11 @@ cmdDomblklist(vshControl *ctl, const vshCmd *cmd) "|./source/@volume)", ctxt); if (details) { if (vshTableRowAppend(table, type, device, target, - source ? source : "-", NULL) < 0) + NULLSTR_MINUS(source), NULL) < 0) goto cleanup; } else { if (vshTableRowAppend(table, target, - source ? source : "-", NULL) < 0) + NULLSTR_MINUS(source), NULL) < 0) goto cleanup; } diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c index 6d8e2b299bb89f17a4a53841317c91af147b3d6a..90000ef1aace0109d339564a0f4bbe376c4dd3fe 100644 --- a/tools/virsh-snapshot.c +++ b/tools/virsh-snapshot.c @@ -945,7 +945,7 @@ cmdSnapshotInfo(vshControl *ctl, const vshCmd *cmd) /* Since we already have the XML, there's no need to call * virDomainSnapshotGetParent */ parent = virXPathString("string(/domainsnapshot/parent/name)", ctxt); - vshPrint(ctl, "%-15s %s\n", _("Parent:"), parent ? parent : "-"); + vshPrint(ctl, "%-15s %s\n", _("Parent:"), NULLSTR_MINUS(parent)); /* Children, Descendants. After this point, the fallback to * compute children is too expensive, so we gracefully quit if the