Fix several g_new() calls which were using extra indirections or pointless

2006-01-18  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkrbtree.c:
	* gtk/gtktreemodel.c: Fix several g_new() calls which
	were using extra indirections or pointless casts.
	(#327423, Morten Welinder)
This commit is contained in:
Matthias Clasen 2006-01-18 05:23:24 +00:00 committed by Matthias Clasen
parent 5369771847
commit 1e05106801
6 changed files with 23 additions and 4 deletions

View File

@ -1,3 +1,10 @@
2006-01-18 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkrbtree.c:
* gtk/gtktreemodel.c: Fix several g_new() calls which
were using extra indirections or pointless casts.
(#327423, Morten Welinder)
Tue Jan 17 19:27:59 2006 Tim Janik <timj@imendio.com>
* gtk/gtkprogress.c: fix adopted from maemo-gtk.

View File

@ -1,3 +1,10 @@
2006-01-18 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkrbtree.c:
* gtk/gtktreemodel.c: Fix several g_new() calls which
were using extra indirections or pointless casts.
(#327423, Morten Welinder)
Tue Jan 17 19:27:59 2006 Tim Janik <timj@imendio.com>
* gtk/gtkprogress.c: fix adopted from maemo-gtk.

View File

@ -1,3 +1,8 @@
2006-01-18 Matthias Clasen <mclasen@redhat.com>
* io-gif.c (gdk_pixbuf__gif_image_load_increment): Don't cast
the results of g_new(). (#327423, Morten Welinder)
2006-01-12 Federico Mena Quintero <federico@ximian.com>
* gdk-pixbuf-util.c (gdk_pixbuf_saturate_and_pixelate): Clarify

View File

@ -1576,7 +1576,7 @@ gdk_pixbuf__gif_image_load_increment (gpointer data,
/* prepare for the next image_load_increment */
if (context->buf == buf) {
g_assert (context->size == size);
context->buf = (guchar *)g_new (guchar, context->amount_needed + (context->size - context->ptr));
context->buf = g_new (guchar, context->amount_needed + (context->size - context->ptr));
memcpy (context->buf, buf + context->ptr, context->size - context->ptr);
} else {
/* copy the left overs to the begining of the buffer */

View File

@ -334,7 +334,7 @@ _gtk_rbtree_new (void)
{
GtkRBTree *retval;
retval = (GtkRBTree *) g_new (GtkRBTree, 1);
retval = g_new (GtkRBTree, 1);
retval->parent_tree = NULL;
retval->parent_node = NULL;

View File

@ -328,7 +328,7 @@ GtkTreePath *
gtk_tree_path_new (void)
{
GtkTreePath *retval;
retval = (GtkTreePath *) g_new (GtkTreePath, 1);
retval = g_new (GtkTreePath, 1);
retval->depth = 0;
retval->indices = NULL;
@ -441,7 +441,7 @@ gtk_tree_path_to_string (GtkTreePath *path)
if (path->depth == 0)
return NULL;
ptr = retval = (gchar *) g_new0 (char *, path->depth*8);
ptr = retval = g_new0 (gchar, path->depth*8);
g_sprintf (retval, "%d", path->indices[0]);
while (*ptr != '\000')
ptr++;