This function always returns zero, so it might as well be void.
Signed-off-by: Matt Coleman <matt(a)datto.com>
---
src/conf/domain_conf.c | 5 +----
src/conf/domain_conf.h | 3 +--
src/qemu/qemu_driver.c | 3 +--
3 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 355bcca66d..090889889a 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -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;
}
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 1b5dbc57e2..42c36d2a37 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -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);
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 30fe3f4ad6..78d1574206 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -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;
--
2.27.0