Additionally avoid initializing it after being calloced. --- src/conf/domain_conf.c | 4 ---- src/conf/domain_conf.h | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 92a7731..a1febda 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -7393,10 +7393,6 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt, _("tray is only valid for cdrom and floppy")); goto error; } - } else { - if (def->device == VIR_DOMAIN_DISK_DEVICE_FLOPPY || - def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) - def->tray_status = VIR_DOMAIN_DISK_TRAY_CLOSED; } if (removable) { diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 555d45d..fd540ed 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -606,7 +606,7 @@ typedef enum { typedef enum { - VIR_DOMAIN_DISK_TRAY_CLOSED, + VIR_DOMAIN_DISK_TRAY_CLOSED = 0, VIR_DOMAIN_DISK_TRAY_OPEN, VIR_DOMAIN_DISK_TRAY_LAST -- 2.8.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list