conf: Move virDomainPinIsDuplicate and make static

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.
This commit is contained in:
John Ferlan 2015-04-21 13:35:33 -04:00
parent 8d4614a512
commit b96254d4a1
3 changed files with 19 additions and 24 deletions

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

View 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);

View File

@ -414,7 +414,6 @@ virDomainPinDefCopy;
virDomainPinDefFree;
virDomainPinDel;
virDomainPinFind;
virDomainPinIsDuplicate;
virDomainPMSuspendedReasonTypeFromString;
virDomainPMSuspendedReasonTypeToString;
virDomainRedirdevBusTypeFromString;