aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution
diff options
context:
space:
mode:
authorLarry Ewing <lewing@ximian.com>2001-09-20 04:19:46 +0800
committerLarry Ewing <lewing@src.gnome.org>2001-09-20 04:19:46 +0800
commitcfe4b2026b5711caa63aaacce433a368e31adebb (patch)
treefcbc1cc54c933da3c155bc163c90022915f6957f /my-evolution
parent00dcd396edfc585316b8778e4b1121c6edf8390e (diff)
downloadgsoc2013-evolution-cfe4b2026b5711caa63aaacce433a368e31adebb.tar.gz
gsoc2013-evolution-cfe4b2026b5711caa63aaacce433a368e31adebb.tar.zst
gsoc2013-evolution-cfe4b2026b5711caa63aaacce433a368e31adebb.zip
remove redundant if. (open_callback): free the previous html even if we
2001-09-19 Larry Ewing <lewing@ximian.com> * 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
Diffstat (limited to 'my-evolution')
-rw-r--r--my-evolution/ChangeLog6
-rw-r--r--my-evolution/e-summary-rdf.c26
2 files changed, 17 insertions, 15 deletions
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog
index 2511007499..21d40bdd8d 100644
--- a/my-evolution/ChangeLog
+++ b/my-evolution/ChangeLog
@@ -1,3 +1,9 @@
+2001-09-19 Larry Ewing <lewing@ximian.com>
+
+ * 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.
+
2001-09-19 Dan Winship <danw@ximian.com>
* e-summary.c (read_callback, etc): Hack around gdkpixbuf lossage
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 ("<b>Error parsing XML</b>");
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 ("<b>%s:</b><br>%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 ("<b>%s:</b><br>%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);
}