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:
Matt Coleman 2020-11-05 22:33:01 -05:00 committed by Michal Privoznik
parent 56dab2f0b3
commit 83959e6a30
3 changed files with 3 additions and 8 deletions

View File

@ -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;
} }

View File

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

View File

@ -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;