[PATCH v2 2/3] conf: Use bool for @check_active parameter

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

 



Use a bool as that's how the variable is used in the function.

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 src/conf/virstorageobj.c     | 2 +-
 src/conf/virstorageobj.h     | 2 +-
 src/storage/storage_driver.c | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c
index 19903b6c5..1eaa53423 100644
--- a/src/conf/virstorageobj.c
+++ b/src/conf/virstorageobj.c
@@ -1133,7 +1133,7 @@ virStoragePoolObjGetNames(virStoragePoolObjListPtr pools,
 int
 virStoragePoolObjIsDuplicate(virStoragePoolObjListPtr pools,
                              virStoragePoolDefPtr def,
-                             unsigned int check_active)
+                             bool check_active)
 {
     int ret = -1;
     virStoragePoolObjPtr obj = NULL;
diff --git a/src/conf/virstorageobj.h b/src/conf/virstorageobj.h
index 4f372386a..dd7001c4b 100644
--- a/src/conf/virstorageobj.h
+++ b/src/conf/virstorageobj.h
@@ -247,7 +247,7 @@ virStoragePoolObjRemove(virStoragePoolObjListPtr pools,
 int
 virStoragePoolObjIsDuplicate(virStoragePoolObjListPtr pools,
                              virStoragePoolDefPtr def,
-                             unsigned int check_active);
+                             bool check_active);
 
 int
 virStoragePoolObjSourceFindDuplicate(virConnectPtr conn,
diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index f86087fb0..f590f6b9b 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -656,7 +656,7 @@ storagePoolCreateXML(virConnectPtr conn,
     if (virStoragePoolCreateXMLEnsureACL(conn, newDef) < 0)
         goto cleanup;
 
-    if (virStoragePoolObjIsDuplicate(driver->pools, newDef, 1) < 0)
+    if (virStoragePoolObjIsDuplicate(driver->pools, newDef, true) < 0)
         goto cleanup;
 
     if (virStoragePoolObjSourceFindDuplicate(conn, driver->pools, newDef) < 0)
@@ -751,7 +751,7 @@ storagePoolDefineXML(virConnectPtr conn,
     if (virStoragePoolDefineXMLEnsureACL(conn, newDef) < 0)
         goto cleanup;
 
-    if (virStoragePoolObjIsDuplicate(driver->pools, newDef, 0) < 0)
+    if (virStoragePoolObjIsDuplicate(driver->pools, newDef, false) < 0)
         goto cleanup;
 
     if (virStoragePoolObjSourceFindDuplicate(conn, driver->pools, newDef) < 0)
-- 
2.13.6

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