changeset 17588:329ca72df5fa

Remove a pair of unneeded strlen's Evan, I like your changes
author Mark Doliner <mark@kingant.net>
date Sun, 10 Jun 2007 21:07:02 +0000
parents b2b91f6e84a9
children 43961a41237a
files libpurple/protocols/oscar/oscar.c
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar.c	Sun Jun 10 20:39:59 2007 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Sun Jun 10 21:07:02 2007 +0000
@@ -5356,7 +5356,6 @@
 		return -EINVAL;
 
 	buf = purple_strdup_withhtml(message);
-	len = strlen(buf);
 
 	if (strstr(buf, "<IMG "))
 		purple_conversation_write(conv, "",
@@ -5376,11 +5375,10 @@
 
 		buf3 = purple_markup_strip_html(buf);
 		g_free(buf);
-		
+
 		buf = purple_strdup_withhtml(buf3);
 		g_free(buf3);
 
-		len = strlen(buf);
 		purple_plugin_oscar_convert_to_best_encoding(gc, NULL, buf, &buf2, &len, &charset, &charsubset);
 
 		if ((len > c->maxlen) || (len > c->maxvis)) {
@@ -5389,10 +5387,10 @@
 			g_free(buf);
 			g_free(buf2);
 			return -E2BIG;
-		} else {
-			purple_debug_info("oscar", "Sending %s as %s because the original was too long.",
-					message, buf2);
 		}
+
+		purple_debug_info("oscar", "Sending %s as %s because the original was too long.",
+				message, buf2);
 	}
 
 	if (charset == AIM_CHARSET_ASCII)