[Commits] parser.c 1.6 1.7
miras at claws-mail.org
miras at claws-mail.org
Wed Dec 21 23:02:55 CET 2011
Update of /home/claws-mail/contacts/xmllib
In directory claws-mail:/tmp/cvs-serv31493/xmllib
Modified Files:
parser.c
Log Message:
2011-12-21 [mir] 0.6.0cvs56
* src/callbacks.c
* src/contactwindow.c
* src/extension-loader.c
* src/gtk-utils.c
* src/plugin-loader.c
* src/printing.c
* src/utils.c
* xmllib/parser.c
Improve public functions error resistens.
Index: parser.c
===================================================================
RCS file: /home/claws-mail/contacts/xmllib/parser.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- parser.c 28 Nov 2011 21:45:28 -0000 1.6
+++ parser.c 21 Dec 2011 22:02:53 -0000 1.7
@@ -408,6 +408,8 @@
xmlNodePtr cur;
GSList* books = NULL;
+ cm_return_val_if_fail(docname != NULL, NULL);
+
if (init_document(INDEXFILE, docname, &doc, &cur, error)) {
return books;
}
@@ -433,6 +435,8 @@
xmlChar *key;
xmlAttr* attribs;
+ cm_return_if_fail(abook != NULL);
+
if (abook->abook_name && strlen(abook->abook_name) > 0)
return;
@@ -465,6 +469,8 @@
xmlDocPtr doc;
xmlNodePtr cur;
+ cm_return_if_fail(abook != NULL);
+
if (init_document(BOOKFILE, abook->URL, &doc, &cur, error)) {
return;
}
@@ -495,6 +501,8 @@
int bytes;
gboolean result = FALSE;
+ cm_return_val_if_fail(old != NULL, TRUE);
+
if (! old && ! new) {
*error = g_strdup("missing old and new address book");
return TRUE;
More information about the Commits
mailing list