tools: use NULLSTR_MINUS

Use the newly introduced macro in the few places that open-code it.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Ján Tomko 2019-02-12 17:09:49 +01:00
parent bd5519deb7
commit 57f5262868
2 changed files with 3 additions and 3 deletions

View File

@ -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;
}

View File

@ -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