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:
parent
2bcc263338
commit
9e4d7b48f8
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user