提交 57f52628 编写于 作者: J Ján Tomko

tools: use NULLSTR_MINUS

Use the newly introduced macro in the few places that open-code it.
Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
上级 bd5519de
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册