From d4c82840cc96f174f53d4693c9a47daf77718fcc Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Sun, 15 Jul 2007 02:11:07 +0000 Subject: Remove needless g_strndup(). * text/e-text.c: (primary_get_cb): Remove needless g_strndup(). svn path=/trunk/; revision=33806 --- widgets/text/e-text.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'widgets/text/e-text.c') diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c index 42e981cccd..34321c5ade 100644 --- a/widgets/text/e-text.c +++ b/widgets/text/e-text.c @@ -2572,10 +2572,9 @@ primary_get_cb (GtkClipboard *clipboard, sel_end = g_utf8_offset_to_pointer (text->text, sel_end) - text->text; if (sel_start != sel_end) { - gchar *str = g_strndup (text->text + sel_start, - sel_end - sel_start); - gtk_selection_data_set_text (selection_data, str, -1); - g_free (str); + gtk_selection_data_set_text (selection_data, + text->text + sel_start, + sel_end - sel_start); } } -- cgit