mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
domain_conf: make virDomainLeaseInsert() void
This function always returns zero, so it might as well be void. Signed-off-by: Matt Coleman <matt@datto.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
56dab2f0b3
commit
83959e6a30
@ -18277,13 +18277,10 @@ void virDomainLeaseInsertPreAlloc(virDomainDefPtr def)
|
||||
def->leases = g_renew(virDomainLeaseDefPtr, def->leases, def->nleases + 1);
|
||||
}
|
||||
|
||||
int virDomainLeaseInsert(virDomainDefPtr def,
|
||||
virDomainLeaseDefPtr lease)
|
||||
void virDomainLeaseInsert(virDomainDefPtr def, virDomainLeaseDefPtr lease)
|
||||
{
|
||||
virDomainLeaseInsertPreAlloc(def);
|
||||
|
||||
virDomainLeaseInsertPreAlloced(def, lease);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -3432,8 +3432,7 @@ const char *virDomainControllerAliasFind(const virDomainDef *def,
|
||||
|
||||
int virDomainLeaseIndex(virDomainDefPtr def,
|
||||
virDomainLeaseDefPtr lease);
|
||||
int virDomainLeaseInsert(virDomainDefPtr def,
|
||||
virDomainLeaseDefPtr lease);
|
||||
void virDomainLeaseInsert(virDomainDefPtr def, virDomainLeaseDefPtr lease);
|
||||
void virDomainLeaseInsertPreAlloc(virDomainDefPtr def);
|
||||
void virDomainLeaseInsertPreAlloced(virDomainDefPtr def,
|
||||
virDomainLeaseDefPtr lease);
|
||||
|
@ -7272,8 +7272,7 @@ qemuDomainAttachDeviceConfig(virDomainDefPtr vmdef,
|
||||
lease->key, NULLSTR(lease->lockspace));
|
||||
return -1;
|
||||
}
|
||||
if (virDomainLeaseInsert(vmdef, lease) < 0)
|
||||
return -1;
|
||||
virDomainLeaseInsert(vmdef, lease);
|
||||
|
||||
/* vmdef has the pointer. Generic codes for vmdef will do all jobs */
|
||||
dev->data.lease = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user