It was just a useless wrapper around VIR_APPEND_ELEMENT*.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/conf/domain_conf.c | 12 ------------
src/conf/domain_conf.h | 3 ---
src/libvirt_private.syms | 1 -
src/qemu/qemu_driver.c | 2 +-
src/qemu/qemu_hotplug.c | 3 +--
5 files changed, 2 insertions(+), 19 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index ed0c471..04f1381 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -14024,18 +14024,6 @@ virDomainChrRemove(virDomainDefPtr vmdef,
}
-int
-virDomainRNGInsert(virDomainDefPtr def,
- virDomainRNGDefPtr rng,
- bool inplace)
-{
- if (inplace)
- return VIR_APPEND_ELEMENT_INPLACE(def->rngs, def->nrngs, rng);
- else
- return VIR_APPEND_ELEMENT(def->rngs, def->nrngs, rng);
-}
-
-
ssize_t
virDomainRNGFind(virDomainDefPtr def,
virDomainRNGDefPtr rng)
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index b9e696d..3ad3604 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2909,9 +2909,6 @@ virDomainChrDefPtr
virDomainChrRemove(virDomainDefPtr vmdef,
virDomainChrDefPtr chr);
-int virDomainRNGInsert(virDomainDefPtr def,
- virDomainRNGDefPtr rng,
- bool inplace);
ssize_t virDomainRNGFind(virDomainDefPtr def, virDomainRNGDefPtr rng);
virDomainRNGDefPtr virDomainRNGRemove(virDomainDefPtr def, size_t idx);
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 8408081..9514201 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -424,7 +424,6 @@ virDomainRedirdevBusTypeToString;
virDomainRNGBackendTypeToString;
virDomainRNGDefFree;
virDomainRNGFind;
-virDomainRNGInsert;
virDomainRNGModelTypeToString;
virDomainRNGRemove;
virDomainRunningReasonTypeFromString;
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 37d970e..00daf72 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -7914,7 +7914,7 @@ qemuDomainAttachDeviceConfig(virQEMUCapsPtr qemuCaps,
return -1;
}
- if (virDomainRNGInsert(vmdef, dev->data.rng, false) < 0)
+ if (VIR_APPEND_ELEMENT(vmdef->rngs, vmdef->nrngs, dev->data.rng) <
0)
return -1;
dev->data.rng = NULL;
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index f8ab095..85c5e0c 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1660,8 +1660,7 @@ qemuDomainAttachRNGDevice(virQEMUDriverPtr driver,
goto cleanup;
}
- if (virDomainRNGInsert(vm->def, rng, true) < 0)
- goto audit;
+ ignore_value(VIR_APPEND_ELEMENT_INPLACE(vm->def->rngs, vm->def->nrngs,
rng));
ret = 0;
--
2.8.2