# HG changeset patch # User Richard Laager # Date 1139212923 0 # Node ID 1ed228c65e891cca93c21f6b167dc506b783afa5 # Parent d38aadce44c51494472e0c3f45944ab4061bb201 [gaim-migrate @ 15499] Rest of SF Patch #1415135 from Sadrul This is some code cleanup. committer: Tailor Script diff -r d38aadce44c5 -r 1ed228c65e89 src/gtkimhtml.c --- a/src/gtkimhtml.c Mon Feb 06 08:00:22 2006 +0000 +++ b/src/gtkimhtml.c Mon Feb 06 08:02:03 2006 +0000 @@ -2951,8 +2951,7 @@ } c += tlen; pos += tlen; - if(tag) - g_free(tag); /* This was allocated back in VALID_TAG() */ + g_free(tag); /* This was allocated back in VALID_TAG() */ } else if (gtk_imhtml_is_smiley(imhtml, fonts, c, &smilelen)) { GtkIMHtmlFontDetail *fd; @@ -3036,8 +3035,7 @@ } g_free(ws); - if (bg) - g_free(bg); + g_free(bg); if (!imhtml->wbfo) gtk_imhtml_close_tags(imhtml, iter); @@ -4034,21 +4032,21 @@ if (tag->name) { if (strcmp(tag->name, "BOLD") == 0) imhtml->edit.bold = TRUE; - if (strcmp(tag->name, "ITALICS") == 0) + else if (strcmp(tag->name, "ITALICS") == 0) imhtml->edit.italic = TRUE; - if (strcmp(tag->name, "UNDERLINE") == 0) + else if (strcmp(tag->name, "UNDERLINE") == 0) imhtml->edit.underline = TRUE; - if (strcmp(tag->name, "STRIKE") == 0) + else if (strcmp(tag->name, "STRIKE") == 0) imhtml->edit.strike = TRUE; - if (strncmp(tag->name, "FORECOLOR ", 10) == 0) + else if (strncmp(tag->name, "FORECOLOR ", 10) == 0) imhtml->edit.forecolor = g_strdup(&(tag->name)[10]); - if (strncmp(tag->name, "BACKCOLOR ", 10) == 0) + else if (strncmp(tag->name, "BACKCOLOR ", 10) == 0) imhtml->edit.backcolor = g_strdup(&(tag->name)[10]); - if (strncmp(tag->name, "FONT FACE ", 10) == 0) + else if (strncmp(tag->name, "FONT FACE ", 10) == 0) imhtml->edit.fontface = g_strdup(&(tag->name)[10]); - if (strncmp(tag->name, "FONT SIZE ", 10) == 0) + else if (strncmp(tag->name, "FONT SIZE ", 10) == 0) imhtml->edit.fontsize = strtol(&(tag->name)[10], NULL, 10); - if ((strncmp(tag->name, "LINK ", 5) == 0) && !gtk_text_iter_is_end(&iter)) + else if ((strncmp(tag->name, "LINK ", 5) == 0) && !gtk_text_iter_is_end(&iter)) imhtml->edit.link = tag; } }