From fb1c9fcb9b5b400ba0b94e942e8033b66d6c3162 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 10 Sep 2001 22:48:52 +0000 Subject: Purification. * e-summary.c (destroy): free the protocol hash. * e-summary-rdf.c (tree_walk): plug a leak. * e-summary-weather.c (e_summary_weather_init_locations): Don't insert duplicates into the hash table. * e-summary-mail.c (e_summary_mail_generate_html): free old html before setting new * e-summary.c (e_summary_draw): free weather and rdf html strings. * e-summary-preferences.c (save_known_rdfs): free strings. svn path=/trunk/; revision=12747 --- my-evolution/e-summary-rdf.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 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 24c8de3cc6..abc4f918c3 100644 --- a/my-evolution/e-summary-rdf.c +++ b/my-evolution/e-summary-rdf.c @@ -116,17 +116,17 @@ layer_find_url (xmlNodePtr node, if (*r == ' ') r++; /* Fix UF bug */ while (*r) { - if (memcmp (r, "&", 5) == 0) { + if (strncmp (r, "&", 5) == 0) { *w++ = '&'; r += 5; continue; } - if (memcmp (r, "<", 4) == 0) { + if (strncmp (r, "<", 4) == 0) { *w++ = '<'; r += 4; continue; } - if (memcmp (r, ">", 4) == 0) { + if (strncmp (r, ">", 4) == 0) { *w++ = '>'; r += 4; continue; @@ -229,12 +229,8 @@ tree_walk (xmlNodePtr root, t = layer_find(channel->childs, "title", ""); u = layer_find(channel->childs, "link", ""); - if (*u != '\0') { - char *full; - - full = g_strdup_printf ("", u); - g_string_append (html, full); - } + if (*u != '\0') + g_string_sprintfa (html, "", u); t = e_utf8_from_locale_string (t); g_string_append (html, t); g_free (t); -- cgit