[gxml/gxml-0.10] Backport fix for bug #760568
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml/gxml-0.10] Backport fix for bug #760568
- Date: Wed, 20 Apr 2016 17:31:04 +0000 (UTC)
commit c6691804618809ff49bc2962568c66fe3af97b97
Author: Daniel Espinosa <esodan gmail com>
Date: Wed Apr 20 12:30:28 2016 -0500
Backport fix for bug #760568
gxml/xlibxml.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/gxml/xlibxml.c b/gxml/xlibxml.c
index 2f57eaa..c9c52ba 100644
--- a/gxml/xlibxml.c
+++ b/gxml/xlibxml.c
@@ -29,7 +29,7 @@ void* gxml_doc_get_intsubset_entities (xmlDoc *doc)
gint gxml_validate_name (xmlChar* name, int space)
{
- g_return_if_fail (name != NULL);
+ g_return_val_if_fail (name != NULL, -1);
return xmlValidateName (name, space);
}
@@ -65,35 +65,35 @@ void gxml_reset_last_error ()
xmlNsPtr* gxml_doc_get_ns_list (xmlDoc* doc, xmlNode* node)
{
- g_return_if_fail (doc != NULL);
- g_return_if_fail (node != NULL);
+ g_return_val_if_fail (doc != NULL, NULL);
+ g_return_val_if_fail (node != NULL, NULL);
return xmlGetNsList (doc, node);
}
xmlTextWriterPtr gxml_new_text_writer_doc (xmlDoc** doc)
{
- g_return_if_fail (doc != NULL);
+ g_return_val_if_fail (doc != NULL, NULL);
return xmlNewTextWriterDoc (doc, 0);
}
xmlTextWriterPtr gxml_new_text_writer_memory (xmlBufferPtr buffer, gint compression)
{
- g_return_if_fail (buffer != NULL);
+ g_return_val_if_fail (buffer != NULL, NULL);
return xmlNewTextWriterMemory (buffer, compression);
}
gint gxml_text_writer_write_cdata (xmlTextWriterPtr tw, const xmlChar* text)
{
- g_return_if_fail (tw != NULL);
- g_return_if_fail (text != NULL);
+ g_return_val_if_fail (tw != NULL, -1);
+ g_return_val_if_fail (text != NULL, -1);
return xmlTextWriterWriteCDATA (tw, text);
}
gint gxml_text_writer_write_pi (xmlTextWriterPtr tw, const xmlChar* target, const xmlChar* data)
{
- g_return_if_fail (tw != NULL);
- g_return_if_fail (target != NULL);
- g_return_if_fail (data != NULL);
+ g_return_val_if_fail (tw != NULL, -1);
+ g_return_val_if_fail (target != NULL, -1);
+ g_return_val_if_fail (data != NULL, -1);
return xmlTextWriterWritePI (tw, target, data);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]