mirror of https://gitee.com/openkylin/libvirt.git
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);
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue