[libvirt-glib] gconfig: Don't try to return value from gvir_config_domain_set_memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



gvir_config_domain_set_memory() is a void function, so using
g_return_val_if_fail() is not correct. This causes a warning/compilation
failure on CentOS CI framework:
https://ci.centos.org/view/libvirt-project/job/libvirt-glib-build/systems=libvirt-fedora-20/144/console
---
Pushed under the build breaker rule.

Christophe


 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 000d4eb..8a6c676 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain.c
@@ -462,7 +462,7 @@ void gvir_config_domain_set_memory(GVirConfigDomain *domain, guint64 memory)
 {
     GVirConfigObject *node;
 
-    g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN(domain), 0);
+    g_return_if_fail(GVIR_CONFIG_IS_DOMAIN(domain));
 
     node = gvir_config_object_replace_child(GVIR_CONFIG_OBJECT(domain), "memory");
     gvir_config_object_set_node_content_uint64(GVIR_CONFIG_OBJECT(node), NULL, memory);
-- 
2.4.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]