diff src/gtkimhtml.c @ 14039:5e6d4c36630a

[gaim-migrate @ 16643] Return g_string_free(str, FALSE) directly instead of assigning str->str to a temporary directory and returning that. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 05 Aug 2006 09:17:09 +0000
parents 8bda65b88e49
children
line wrap: on
line diff
--- a/src/gtkimhtml.c	Sat Aug 05 09:11:46 2006 +0000
+++ b/src/gtkimhtml.c	Sat Aug 05 09:17:09 2006 +0000
@@ -220,7 +220,6 @@
 	int length;
 	GString *clipboard;
 	gchar *tmp;
-	gchar *ret;
 
 	if (html == NULL)
 		return NULL;
@@ -238,14 +237,8 @@
 	g_string_append(clipboard, "<!--StartFragment-->\r\n");
 	g_string_append(clipboard, html);
 	g_string_append(clipboard, "\r\n<!--EndFragment-->");
-	ret = clipboard->str;
-	g_string_free(clipboard, FALSE);
-
-#if 0 /* Debugging for Windows clipboard */
-	gaim_debug_info("imhtml clipboard", "from gaim: %s\n", ret);
-#endif
-
-	return ret;
+
+	return g_string_free(clipboard, FALSE);
 }
 
 static void clipboard_copy_html_win32(GtkIMHtml *imhtml) {
@@ -2229,11 +2222,9 @@
 			e++;
 		}
 	}
-
 	g_free(val);
-	val = ret->str;
-	g_string_free(ret, FALSE);
-	return val;
+
+	return g_string_free(ret, FALSE);
 }
 
 static const char *accepted_protocols[] = {