[libvirt] [PATCH 02/10] conf: disk: Don't initialize fields allocated by calloc

Peter Krempa pkrempa at redhat.com
Tue Apr 12 13:55:36 UTC 2016


All the fields were initialized to 0.
---
 src/conf/domain_conf.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 0320691..aa96bac 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -6737,14 +6737,6 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
     if (!(def = virDomainDiskDefNew(xmlopt)))
         return NULL;

-    def->geometry.cylinders = 0;
-    def->geometry.heads = 0;
-    def->geometry.sectors = 0;
-    def->geometry.trans = VIR_DOMAIN_DISK_TRANS_DEFAULT;
-
-    def->blockio.logical_block_size = 0;
-    def->blockio.physical_block_size = 0;
-
     ctxt->node = node;

     type = virXMLPropString(node, "type");
-- 
2.8.0




More information about the libvir-list mailing list