]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: virDomainDriveAddressIsUsedByDisk: Rename type to bus_type
authorMarc Hartmayer <mhartmay@linux.vnet.ibm.com>
Wed, 30 Nov 2016 11:47:02 +0000 (12:47 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 5 Dec 2016 09:45:46 +0000 (10:45 +0100)
Comparing the parameter 'type' against the member 'bus' instead of
against the member 'type' is quite confusing. Rename the parameter
'type' to 'bus_type' to clarify its meaning.

Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
src/conf/domain_conf.c

index 89408e766bd68bed72a10a1b9171559212f2a049..25d7186aca31d146f523ac0b5bc65e2cc76e8dd8 100644 (file)
@@ -4019,7 +4019,7 @@ virDomainDefPostParseGraphics(virDomainDef *def)
 /**
  * virDomainDriveAddressIsUsedByDisk:
  * @def: domain definition containing the disks to check
- * @type: bus type
+ * @bus_type: bus type
  * @addr: address to check for duplicates
  *
  * Return true if any disk is already using the given address on the
@@ -4027,7 +4027,7 @@ virDomainDefPostParseGraphics(virDomainDef *def)
  */
 static bool
 virDomainDriveAddressIsUsedByDisk(const virDomainDef *def,
-                                  virDomainDiskBus type,
+                                  virDomainDiskBus bus_type,
                                   const virDomainDeviceDriveAddress *addr)
 {
     virDomainDiskDefPtr disk;
@@ -4036,7 +4036,7 @@ virDomainDriveAddressIsUsedByDisk(const virDomainDef *def,
     for (i = 0; i < def->ndisks; i++) {
         disk = def->disks[i];
 
-        if (disk->bus != type ||
+        if (disk->bus != bus_type ||
             disk->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE)
             continue;