There's no point in duplicating virObjectFreeHashData() in a separate
function.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/conf/domain_conf.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index ccd3bdf..aad4ec0 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -1032,13 +1032,6 @@
virDomainDeviceDefCheckUnsupportedMemoryDevice(virDomainDeviceDefPtr dev)
}
-static void
-virDomainObjListDataFree(void *payload, const void *name ATTRIBUTE_UNUSED)
-{
- virDomainObjPtr obj = payload;
- virObjectUnref(obj);
-}
-
virDomainObjListPtr virDomainObjListNew(void)
{
virDomainObjListPtr doms;
@@ -1049,7 +1042,7 @@ virDomainObjListPtr virDomainObjListNew(void)
if (!(doms = virObjectLockableNew(virDomainObjListClass)))
return NULL;
- if (!(doms->objs = virHashCreate(50, virDomainObjListDataFree))) {
+ if (!(doms->objs = virHashCreate(50, virObjectFreeHashData))) {
virObjectUnref(doms);
return NULL;
}
--
2.0.5