Commit 1c8ce29 added a way to unset a GVirConfigDomainClock set on a
GVirConfigDomain by calling gvir_config_domain_set_clock() with a NULL
argument.
However, a typo in a g_return_if_fail precondition prevents this code from
ever being called: g_return_if_fail(clock != NULL) is used while it should
have been g_return_if_fail(clock == NULL) as in all other preconditions in
1c8ce29.
---
libvirt-gconfig/libvirt-gconfig-domain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain.c
b/libvirt-gconfig/libvirt-gconfig-domain.c
index 3c28a4a..6cd2f86 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain.c
@@ -552,7 +552,7 @@ void gvir_config_domain_set_clock(GVirConfigDomain *domain,
GVirConfigDomainClock *klock)
{
g_return_if_fail(GVIR_CONFIG_IS_DOMAIN(domain));
- g_return_if_fail(klock != NULL || GVIR_CONFIG_IS_DOMAIN_CLOCK(klock));
+ g_return_if_fail(klock == NULL || GVIR_CONFIG_IS_DOMAIN_CLOCK(klock));
gvir_config_object_attach_replace(GVIR_CONFIG_OBJECT(domain),
"clock",
--
1.8.4.2