[Commits] [SCM] claws branch, master, updated. 3.17.0-175-g9c845be

ticho at claws-mail.org ticho at claws-mail.org
Tue Nov 20 17:23:08 CET 2018


The branch, master has been updated
       via  9c845be70dcef765a44790657578660c4affb94d (commit)
      from  7698ec3ca69965809c20f9e3416519128fb668d3 (commit)

Summary of changes:
 src/common/xml.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit 9c845be70dcef765a44790657578660c4affb94d
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Mon Nov 19 11:23:35 2018 +0100

    xml_parse_file() fails without assertion warning if xml_open_file() returns NULL.
    
    This is not a programmer mistake, therefore an assertion
    warning is not a good idea. xml_open_file() already shows
    an assertion warning if necessary.

diff --git a/src/common/xml.c b/src/common/xml.c
index 874db1f..5ed7597 100644
--- a/src/common/xml.c
+++ b/src/common/xml.c
@@ -88,6 +88,7 @@ XMLFile *xml_open_file(const gchar *path)
 
 	newfile->fp = claws_fopen(path, "rb");
 	if (!newfile->fp) {
+		FILE_OP_ERROR(path, "fopen");
 		g_free(newfile);
 		return NULL;
 	}
@@ -161,7 +162,8 @@ GNode *xml_parse_file(const gchar *path)
 	GNode *node;
 
 	file = xml_open_file(path);
-	cm_return_val_if_fail(file != NULL, NULL);
+	if (file == NULL)
+		return NULL;
 
 	xml_get_dtd(file);
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list