1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-11 09:17:52 +03:00

Convert virDomainPinIsDuplicate into bool return

Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
John Ferlan 2015-04-03 06:57:32 -04:00
parent 2bcc263338
commit 9e4d7b48f8
2 changed files with 8 additions and 9 deletions

View File

@ -17277,9 +17277,8 @@ virDomainDefAddImplicitControllers(virDomainDefPtr def)
return 0;
}
/* Check if vcpupin with same id already exists.
* Return 1 if exists, 0 if not. */
int
/* Check if vcpupin with same id already exists. */
bool
virDomainPinIsDuplicate(virDomainPinDefPtr *def,
int npin,
int id)
@ -17287,14 +17286,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

View File

@ -1934,7 +1934,7 @@ void virDomainPinDefArrayFree(virDomainPinDefPtr *def, int npin);
virDomainPinDefPtr *virDomainPinDefCopy(virDomainPinDefPtr *src,
int npin);
int virDomainPinIsDuplicate(virDomainPinDefPtr *def,
bool virDomainPinIsDuplicate(virDomainPinDefPtr *def,
int npin,
int id);