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 | 4 +---
src/libxl/libxl_conf.c | 3 +--
src/libxl/libxl_driver.c | 3 +--
src/qemu/qemu_driver.c | 3 +--
5 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 6d0403b612..4eace66ce7 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -18086,14 +18086,11 @@ virDomainNetARPInterfaces(virDomainDefPtr def,
}
-int virDomainControllerInsert(virDomainDefPtr def,
+void virDomainControllerInsert(virDomainDefPtr def,
virDomainControllerDefPtr controller)
{
def->controllers = g_renew(virDomainControllerDefPtr, def->controllers,
def->ncontrollers + 1);
-
virDomainControllerInsertPreAlloced(def, controller);
-
- return 0;
}
void virDomainControllerInsertPreAlloced(virDomainDefPtr def,
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 92155ec305..83dfd6ac3e 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -3417,9 +3417,7 @@ int virDomainNetAppendIPAddress(virDomainNetDefPtr def,
int family,
unsigned int prefix);
-int virDomainControllerInsert(virDomainDefPtr def,
- virDomainControllerDefPtr controller)
- G_GNUC_WARN_UNUSED_RESULT;
+void virDomainControllerInsert(virDomainDefPtr def, virDomainControllerDefPtr
controller);
void virDomainControllerInsertPreAlloced(virDomainDefPtr def,
virDomainControllerDefPtr controller);
int virDomainControllerFind(const virDomainDef *def, int type, int idx);
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 383f2295a2..00748e21e8 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -2127,8 +2127,7 @@ libxlMakeDefaultUSBControllers(virDomainDefPtr def,
if (libxlMakeUSBController(l_controller, &x_controllers[i]) < 0)
goto error;
- if (virDomainControllerInsert(def, l_controller) < 0)
- goto error;
+ virDomainControllerInsert(def, l_controller);
l_controller = NULL;
}
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 176516f5cb..6af274cb1b 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -3563,8 +3563,7 @@ libxlDomainAttachDeviceConfig(virDomainDefPtr vmdef,
virDomainDeviceDefPtr dev)
return -1;
}
- if (virDomainControllerInsert(vmdef, controller) < 0)
- return -1;
+ virDomainControllerInsert(vmdef, controller);
dev->data.controller = NULL;
break;
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 58c34cd472..30fe3f4ad6 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -7290,8 +7290,7 @@ qemuDomainAttachDeviceConfig(virDomainDefPtr vmdef,
return -1;
}
- if (virDomainControllerInsert(vmdef, controller) < 0)
- return -1;
+ virDomainControllerInsert(vmdef, controller);
dev->data.controller = NULL;
break;
--
2.27.0