[PATCH v2 2/9] Convert virDomainPinIsDuplicate into bool return

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

 



Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 8 ++++----
 src/conf/domain_conf.h | 6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 880b89c..1f5bf62 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -17277,7 +17277,7 @@ virDomainDefAddImplicitControllers(virDomainDefPtr def)
 
 /* Check if vcpupin with same id already exists.
  * Return 1 if exists, 0 if not. */
-int
+bool
 virDomainPinIsDuplicate(virDomainPinDefPtr *def,
                         int npin,
                         int id)
@@ -17285,14 +17285,14 @@ virDomainPinIsDuplicate(virDomainPinDefPtr *def,
     size_t i;
 
     if (!def || !npin)
-        return 0;
+        return false;
 
     for (i = 0; i < npin; i++) {
         if (def[i]->id == id)
-            return 1;
+            return true;
     }
 
-    return 0;
+    return false;
 }
 
 virDomainPinDefPtr
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 61082c8..95cbb9c 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1934,9 +1934,9 @@ void virDomainPinDefArrayFree(virDomainPinDefPtr *def, int npin);
 virDomainPinDefPtr *virDomainPinDefCopy(virDomainPinDefPtr *src,
                                         int npin);
 
-int virDomainPinIsDuplicate(virDomainPinDefPtr *def,
-                            int npin,
-                            int id);
+bool virDomainPinIsDuplicate(virDomainPinDefPtr *def,
+                             int npin,
+                             int id);
 
 virDomainPinDefPtr virDomainPinFind(virDomainPinDefPtr *def,
                                     int npin,
-- 
2.1.0

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