[PATCH] conf: check rombar against VIR_DOMAIN_TRISTATE_SWITCH_ABSENT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Make the comparison explicit.
---
 src/conf/domain_conf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 3cdb5e348..b5ce2ecd9 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -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)
-- 
2.13.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux