[libvirt] [PATCH 7/8] logical: Fix @on argument type

John Ferlan jferlan at redhat.com
Tue Dec 4 16:47:16 UTC 2018


It's only pass as 0 or 1 and used as a bool, let's just use a bool

Signed-off-by: John Ferlan <jferlan at redhat.com>
---
 src/storage/storage_backend_logical.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c
index cad88756cb..44cff61af7 100644
--- a/src/storage/storage_backend_logical.c
+++ b/src/storage/storage_backend_logical.c
@@ -48,7 +48,7 @@ VIR_LOG_INIT("storage.storage_backend_logical");
 
 static int
 virStorageBackendLogicalSetActive(virStoragePoolObjPtr pool,
-                                  int on)
+                                  bool on)
 {
     int ret;
     virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool);
@@ -731,7 +731,7 @@ virStorageBackendLogicalStartPool(virStoragePoolObjPtr pool)
      * that the pool's source devices match the pvs output.
      */
     if (!virStorageBackendLogicalMatchPoolSource(pool) ||
-        virStorageBackendLogicalSetActive(pool, 1) < 0)
+        virStorageBackendLogicalSetActive(pool, true) < 0)
         return -1;
 
     return 0;
@@ -858,7 +858,7 @@ virStorageBackendLogicalRefreshPool(virStoragePoolObjPtr pool)
 static int
 virStorageBackendLogicalStopPool(virStoragePoolObjPtr pool)
 {
-    if (virStorageBackendLogicalSetActive(pool, 0) < 0)
+    if (virStorageBackendLogicalSetActive(pool, false) < 0)
         return -1;
 
     return 0;
-- 
2.17.2




More information about the libvir-list mailing list