From cfe4b2026b5711caa63aaacce433a368e31adebb Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Wed, 19 Sep 2001 20:19:46 +0000 Subject: remove redundant if. (open_callback): free the previous html even if we 2001-09-19 Larry Ewing * e-summary-rdf.c (read_callback): remove redundant if. (open_callback): free the previous html even if we get an error. (rdf_free): remove redundant null checks. svn path=/trunk/; revision=12985 --- my-evolution/e-summary-rdf.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'my-evolution/e-summary-rdf.c') diff --git a/my-evolution/e-summary-rdf.c b/my-evolution/e-summary-rdf.c index 2f04d18c84..0cc88a2181 100644 --- a/my-evolution/e-summary-rdf.c +++ b/my-evolution/e-summary-rdf.c @@ -332,9 +332,7 @@ close_callback (GnomeVFSAsyncHandle *handle, doc = xmlParseMemory (xml, strlen (xml)); #if 0 if (doc == NULL) { - if (r->html != NULL) { - g_free (r->html); - } + g_free (r->html); r->html = g_strdup ("Error parsing XML"); e_summary_draw (r->summary); @@ -359,13 +357,12 @@ read_callback (GnomeVFSAsyncHandle *handle, { if (result != GNOME_VFS_OK && result != GNOME_VFS_ERROR_EOF) { char *str; - if (r->html) { - g_free (r->html); - } + g_free (r->html); str = g_strdup_printf ("%s:
%s", _("Error downloading RDF"), r->uri); r->html = e_utf8_from_locale_string (str); + g_free (str); e_summary_draw (r->summary); @@ -394,6 +391,7 @@ open_callback (GnomeVFSAsyncHandle *handle, if (result != GNOME_VFS_OK) { char *str; + g_free (r->html); str = g_strdup_printf ("%s:
%s", _("Error downloading RDF"), r->uri); r->html = e_utf8_from_locale_string (str); @@ -520,21 +518,19 @@ rdf_free (RDF *r) if (r->handle) { gnome_vfs_async_cancel (r->handle); } - if (r->uri) { - g_free (r->uri); - } - if (r->html) { - g_free (r->html); - } + + g_free (r->uri); + g_free (r->html); + g_free (r->buffer); + if (r->string) { g_string_free (r->string, TRUE); } - if (r->buffer) { - g_free (r->buffer); - } + if (r->cache) { xmlFreeDoc (r->cache); } + g_free (r); } -- cgit v1.2.3