On Tue, Mar 10, 2020 at 17:30:01 +0530, Gaurav Agrawal wrote:
---
src/qemu/qemu_domain.c | 36 ++++++++++++++++++++----------------
src/qemu/qemu_domain.h | 6 ++++--
src/qemu/qemu_process.c | 4 ++--
3 files changed, 26 insertions(+), 20 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 3d3f796d85..0d2edf4dbe 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -150,7 +150,7 @@ qemuDomainObjFromDomain(virDomainPtr domain)
[...]
static int
qemuDomainOnceInit(void)
{
- if (!VIR_CLASS_NEW(qemuDomainLogContext, virClassForObject()))
- return -1;
-
if (!VIR_CLASS_NEW(qemuDomainSaveCookie, virClassForObject()))
return -1;
return 0;
}
+static void qemu_domain_log_context_init(qemuDomainLogContext *logctxt G_GNUC_UNUSED)
+{
+}
There's no reason to break coding style rules in this kind of refactor
nor to make it inconsistent in span of 20 lines.
+
+static void qemu_domain_log_context_class_init(qemuDomainLogContextClass *klass)
+{
+ GObjectClass *obj = G_OBJECT_CLASS(klass);
+
+ obj->finalize = qemuDomainLogContextFinalize;
+}
+