mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 15:15:25 +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);
|
def->leases = g_renew(virDomainLeaseDefPtr, def->leases, def->nleases + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int virDomainLeaseInsert(virDomainDefPtr def,
|
void virDomainLeaseInsert(virDomainDefPtr def, virDomainLeaseDefPtr lease)
|
||||||
virDomainLeaseDefPtr lease)
|
|
||||||
{
|
{
|
||||||
virDomainLeaseInsertPreAlloc(def);
|
virDomainLeaseInsertPreAlloc(def);
|
||||||
|
|
||||||
virDomainLeaseInsertPreAlloced(def, lease);
|
virDomainLeaseInsertPreAlloced(def, lease);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3432,8 +3432,7 @@ const char *virDomainControllerAliasFind(const virDomainDef *def,
|
|||||||
|
|
||||||
int virDomainLeaseIndex(virDomainDefPtr def,
|
int virDomainLeaseIndex(virDomainDefPtr def,
|
||||||
virDomainLeaseDefPtr lease);
|
virDomainLeaseDefPtr lease);
|
||||||
int virDomainLeaseInsert(virDomainDefPtr def,
|
void virDomainLeaseInsert(virDomainDefPtr def, virDomainLeaseDefPtr lease);
|
||||||
virDomainLeaseDefPtr lease);
|
|
||||||
void virDomainLeaseInsertPreAlloc(virDomainDefPtr def);
|
void virDomainLeaseInsertPreAlloc(virDomainDefPtr def);
|
||||||
void virDomainLeaseInsertPreAlloced(virDomainDefPtr def,
|
void virDomainLeaseInsertPreAlloced(virDomainDefPtr def,
|
||||||
virDomainLeaseDefPtr lease);
|
virDomainLeaseDefPtr lease);
|
||||||
|
@ -7272,8 +7272,7 @@ qemuDomainAttachDeviceConfig(virDomainDefPtr vmdef,
|
|||||||
lease->key, NULLSTR(lease->lockspace));
|
lease->key, NULLSTR(lease->lockspace));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (virDomainLeaseInsert(vmdef, lease) < 0)
|
virDomainLeaseInsert(vmdef, lease);
|
||||||
return -1;
|
|
||||||
|
|
||||||
/* vmdef has the pointer. Generic codes for vmdef will do all jobs */
|
/* vmdef has the pointer. Generic codes for vmdef will do all jobs */
|
||||||
dev->data.lease = NULL;
|
dev->data.lease = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user