mirror of https://gitee.com/openkylin/libvirt.git
conf: Improve error handling in virDomainChrDefFormat()
We don't need to store the return value since we never modify it. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
00b7f81fa8
commit
be956c4e38
|
@ -24037,8 +24037,6 @@ virDomainChrDefFormat(virBufferPtr buf,
|
||||||
const char *elementName = virDomainChrDeviceTypeToString(def->deviceType);
|
const char *elementName = virDomainChrDeviceTypeToString(def->deviceType);
|
||||||
bool tty_compat;
|
bool tty_compat;
|
||||||
|
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
if (!elementName) {
|
if (!elementName) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("unexpected char device type %d"),
|
_("unexpected char device type %d"),
|
||||||
|
@ -24066,7 +24064,7 @@ virDomainChrDefFormat(virBufferPtr buf,
|
||||||
virBufferAdjustIndent(buf, -2);
|
virBufferAdjustIndent(buf, -2);
|
||||||
virBufferAsprintf(buf, "</%s>\n", elementName);
|
virBufferAsprintf(buf, "</%s>\n", elementName);
|
||||||
|
|
||||||
return ret;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
Loading…
Reference in New Issue