conf: check rombar against VIR_DOMAIN_TRISTATE_SWITCH_ABSENT

Make the comparison explicit.
This commit is contained in:
Ján Tomko 2017-08-02 17:23:08 +02:00
parent 73541fa8ee
commit 5d218156a8

View File

@ -5359,10 +5359,10 @@ virDomainDeviceInfoFormat(virBufferPtr buf,
}
if ((flags & VIR_DOMAIN_DEF_FORMAT_ALLOW_ROM) &&
(info->rombar || info->romfile)) {
(info->rombar != VIR_TRISTATE_SWITCH_ABSENT || info->romfile)) {
virBufferAddLit(buf, "<rom");
if (info->rombar) {
if (info->rombar != VIR_TRISTATE_SWITCH_ABSENT) {
const char *rombar = virTristateSwitchTypeToString(info->rombar);
if (rombar)