提交 be956c4e 编写于 作者: A Andrea Bolognani

conf: Improve error handling in virDomainChrDefFormat()

We don't need to store the return value since we never modify it.
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
上级 00b7f81f
......@@ -24037,8 +24037,6 @@ virDomainChrDefFormat(virBufferPtr buf,
const char *elementName = virDomainChrDeviceTypeToString(def->deviceType);
bool tty_compat;
int ret = 0;
if (!elementName) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("unexpected char device type %d"),
......@@ -24066,7 +24064,7 @@ virDomainChrDefFormat(virBufferPtr buf,
virBufferAdjustIndent(buf, -2);
virBufferAsprintf(buf, "</%s>\n", elementName);
return ret;
return 0;
}
static int
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册