Since this function no longer tries to do XML parsing, there is
no error to report.
---
libvirt-gconfig/libvirt-gconfig-domain.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-object.c | 7 +++----
libvirt-gconfig/libvirt-gconfig-object.h | 2 +-
3 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain.c
b/libvirt-gconfig/libvirt-gconfig-domain.c
index ffd707d..210b3fa 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain.c
@@ -142,7 +142,7 @@ char *gvir_config_domain_get_name(GVirConfigDomain *domain)
{
xmlNodePtr node;
- node = gvir_config_object_get_xml_node(GVIR_CONFIG_OBJECT(domain), NULL);
+ node = gvir_config_object_get_xml_node(GVIR_CONFIG_OBJECT(domain));
if (node == NULL)
return NULL;
@@ -156,8 +156,7 @@ void gvir_config_domain_set_name(GVirConfigDomain *domain, const char
*name)
xmlNodePtr new_node;
xmlChar *encoded_name;
- parent_node = gvir_config_object_get_xml_node(GVIR_CONFIG_OBJECT(domain),
- NULL);
+ parent_node = gvir_config_object_get_xml_node(GVIR_CONFIG_OBJECT(domain));
encoded_name = xmlEncodeEntitiesReentrant(parent_node->doc,
(xmlChar *)name);
new_node = xmlNewDocNode(parent_node->doc, NULL,
diff --git a/libvirt-gconfig/libvirt-gconfig-object.c
b/libvirt-gconfig/libvirt-gconfig-object.c
index bcb622a..97ac2e3 100644
--- a/libvirt-gconfig/libvirt-gconfig-object.c
+++ b/libvirt-gconfig/libvirt-gconfig-object.c
@@ -86,7 +86,7 @@ static void gvir_config_object_get_property(GObject *object,
break;
case PROP_NODE:
- g_value_set_pointer(value, gvir_config_object_get_xml_node(conn, NULL));
+ g_value_set_pointer(value, gvir_config_object_get_xml_node(conn));
break;
default:
@@ -279,7 +279,7 @@ gchar *gvir_config_object_to_xml(GVirConfigObject *config)
xmlNodePtr node;
gchar *output_doc;
- node = gvir_config_object_get_xml_node(config, NULL);
+ node = gvir_config_object_get_xml_node(config);
if (node == NULL)
return NULL;
@@ -306,8 +306,7 @@ const gchar *gvir_config_object_get_schema(GVirConfigObject *config)
/* FIXME: will we always have one xmlNode per GConfig object? */
/* FIXME: need to return the right node from subclasses */
/* NB: the xmlNodePtr must not be freed by the caller */
-xmlNodePtr gvir_config_object_get_xml_node(GVirConfigObject *config,
- GError **error)
+xmlNodePtr gvir_config_object_get_xml_node(GVirConfigObject *config)
{
return config->priv->node;
}
diff --git a/libvirt-gconfig/libvirt-gconfig-object.h
b/libvirt-gconfig/libvirt-gconfig-object.h
index 98a05cb..5860102 100644
--- a/libvirt-gconfig/libvirt-gconfig-object.h
+++ b/libvirt-gconfig/libvirt-gconfig-object.h
@@ -66,7 +66,7 @@ gchar *gvir_config_object_to_xml(GVirConfigObject *config);
const gchar *gvir_config_object_get_doc(GVirConfigObject *config);
const gchar *gvir_config_object_get_schema(GVirConfigObject *config);
-xmlNodePtr gvir_config_object_get_xml_node(GVirConfigObject *config, GError **error);
+xmlNodePtr gvir_config_object_get_xml_node(GVirConfigObject *config);
/* FIXME: move to a libvirt-gconfig-helpers.h file? */
xmlNodePtr gvir_config_object_parse(const char *xml, const char *root_node, GError
**err);
--
1.7.6.4