mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
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:
parent
bd5519deb7
commit
57f5262868
@ -643,11 +643,11 @@ cmdDomblklist(vshControl *ctl, const vshCmd *cmd)
|
|||||||
"|./source/@volume)", ctxt);
|
"|./source/@volume)", ctxt);
|
||||||
if (details) {
|
if (details) {
|
||||||
if (vshTableRowAppend(table, type, device, target,
|
if (vshTableRowAppend(table, type, device, target,
|
||||||
source ? source : "-", NULL) < 0)
|
NULLSTR_MINUS(source), NULL) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
} else {
|
} else {
|
||||||
if (vshTableRowAppend(table, target,
|
if (vshTableRowAppend(table, target,
|
||||||
source ? source : "-", NULL) < 0)
|
NULLSTR_MINUS(source), NULL) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -945,7 +945,7 @@ cmdSnapshotInfo(vshControl *ctl, const vshCmd *cmd)
|
|||||||
/* Since we already have the XML, there's no need to call
|
/* Since we already have the XML, there's no need to call
|
||||||
* virDomainSnapshotGetParent */
|
* virDomainSnapshotGetParent */
|
||||||
parent = virXPathString("string(/domainsnapshot/parent/name)", ctxt);
|
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
|
/* Children, Descendants. After this point, the fallback to
|
||||||
* compute children is too expensive, so we gracefully quit if the
|
* compute children is too expensive, so we gracefully quit if the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user