aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/text
diff options
context:
space:
mode:
authorHiroyuki Ikezoe <hiikezoe@src.gnome.org>2007-07-15 10:11:07 +0800
committerHiroyuki Ikezoe <hiikezoe@src.gnome.org>2007-07-15 10:11:07 +0800
commitd4c82840cc96f174f53d4693c9a47daf77718fcc (patch)
tree475c7d55986783a0b24de96ecbbc495ad64b3cbd /widgets/text
parent1d4717609f39de175c07b91564beef2a7242f942 (diff)
downloadgsoc2013-evolution-d4c82840cc96f174f53d4693c9a47daf77718fcc.tar.gz
gsoc2013-evolution-d4c82840cc96f174f53d4693c9a47daf77718fcc.tar.zst
gsoc2013-evolution-d4c82840cc96f174f53d4693c9a47daf77718fcc.zip
Remove needless g_strndup().
* text/e-text.c: (primary_get_cb): Remove needless g_strndup(). svn path=/trunk/; revision=33806
Diffstat (limited to 'widgets/text')
-rw-r--r--widgets/text/e-text.c7
1 files changed, 3 insertions, 4 deletions
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);
}
}