]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: disk: Don't initialize fields allocated by calloc
authorPeter Krempa <pkrempa@redhat.com>
Mon, 11 Apr 2016 14:06:07 +0000 (16:06 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 13 Apr 2016 06:20:44 +0000 (08:20 +0200)
All the fields were initialized to 0.

src/conf/domain_conf.c

index a3739e7df4114afe5d43389f4d6b348c2245645e..fb5d3277525ea7d5d262b0774664e8d0296593f8 100644 (file)
@@ -6742,14 +6742,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");