[PATCH 2/5] conf: virDomainDriveAddressIsUsedByDisk: Rename type to bus_type

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

 



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@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxxxxxxx>
---
 src/conf/domain_conf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 6836d4e..cd30728 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -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;
 
-- 
2.5.5

--
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