[gtk+] Fix c99ism - declaration in the mid of a block
- From: Hans Breuer <hans src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+] Fix c99ism - declaration in the mid of a block
- Date: Mon, 13 Jul 2009 07:51:56 +0000 (UTC)
commit c6f9e39762f9ae338c685cbdfdd247e3bb464941
Author: Hans Breuer <hans breuer org>
Date: Sun Jul 12 17:58:41 2009 +0200
Fix c99ism - declaration in the mid of a block
gtk/gtkentrybuffer.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkentrybuffer.c b/gtk/gtkentrybuffer.c
index d39381a..8653327 100644
--- a/gtk/gtkentrybuffer.c
+++ b/gtk/gtkentrybuffer.c
@@ -132,6 +132,8 @@ gtk_entry_buffer_normal_insert_text (GtkEntryBuffer *buffer,
/* Need more memory */
if (n_bytes + pv->normal_text_bytes + 1 > pv->normal_text_size)
{
+ gchar *et_new;
+
prev_size = pv->normal_text_size;
/* Calculate our new buffer size */
@@ -158,7 +160,7 @@ gtk_entry_buffer_normal_insert_text (GtkEntryBuffer *buffer,
}
/* Could be a password, so can't leave stuff in memory. */
- gchar *et_new = g_malloc (pv->normal_text_size);
+ et_new = g_malloc (pv->normal_text_size);
memcpy (et_new, pv->normal_text, MIN (prev_size, pv->normal_text_size));
trash_area (pv->normal_text, prev_size);
g_free (pv->normal_text);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]