]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
conf: Move virDomainPinIsDuplicate and make static
authorJohn Ferlan <jferlan@redhat.com>
Tue, 21 Apr 2015 17:35:33 +0000 (13:35 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 27 Apr 2015 16:36:35 +0000 (12:36 -0400)
Since it's only ever referenced in domain_conf.c, make the function
static, but also will need to move it to somewhere before it's referenced
rather than forward referencing it.

src/conf/domain_conf.c
src/conf/domain_conf.h
src/libvirt_private.syms

index 1051936439220a3c50237876c396286b36bbe66d..c453a209d639a230e0653a5adffc290ef476e624 100644 (file)
@@ -13246,6 +13246,25 @@ virDomainIOThreadIDDefParseXML(xmlNodePtr node,
 }
 
 
+/* Check if pin with same id already exists. */
+static bool
+virDomainPinIsDuplicate(virDomainPinDefPtr *def,
+                        int npin,
+                        int id)
+{
+    size_t i;
+
+    if (!def || !npin)
+        return false;
+
+    for (i = 0; i < npin; i++) {
+        if (def[i]->id == id)
+            return true;
+    }
+
+    return false;
+}
+
 /* Parse the XML definition for a vcpupin
  *
  * vcpupin has the form of
@@ -17440,25 +17459,6 @@ virDomainIOThreadIDDel(virDomainDefPtr def,
     }
 }
 
-/* Check if vcpupin with same id already exists. */
-bool
-virDomainPinIsDuplicate(virDomainPinDefPtr *def,
-                        int npin,
-                        int id)
-{
-    size_t i;
-
-    if (!def || !npin)
-        return false;
-
-    for (i = 0; i < npin; i++) {
-        if (def[i]->id == id)
-            return true;
-    }
-
-    return false;
-}
-
 virDomainPinDefPtr
 virDomainPinFind(virDomainPinDefPtr *def,
                  int npin,
index c7966a47a91316ba86959aee4621147608e5f4e4..2cc7ffd8cef4b21baba308ecbeab4c1132acbbb4 100644 (file)
@@ -1947,10 +1947,6 @@ void virDomainPinDefArrayFree(virDomainPinDefPtr *def, int npin);
 virDomainPinDefPtr *virDomainPinDefCopy(virDomainPinDefPtr *src,
                                         int npin);
 
-bool virDomainPinIsDuplicate(virDomainPinDefPtr *def,
-                             int npin,
-                             int id);
-
 virDomainPinDefPtr virDomainPinFind(virDomainPinDefPtr *def,
                                     int npin,
                                     int id);
index 1c345fcdab962eea1395d1c2a013ecaea57924cc..f3d2c38debdc9a118d78d6b5e2f3d0b2c32ae59e 100644 (file)
@@ -414,7 +414,6 @@ virDomainPinDefCopy;
 virDomainPinDefFree;
 virDomainPinDel;
 virDomainPinFind;
-virDomainPinIsDuplicate;
 virDomainPMSuspendedReasonTypeFromString;
 virDomainPMSuspendedReasonTypeToString;
 virDomainRedirdevBusTypeFromString;