[clutter] clutter-id-pool: fix warning on bad pick



commit e83a7851ad2cf64e778465620b23fe3c111c7164
Author: Dan Winship <danw gnome org>
Date:   Thu May 19 10:46:24 2011 -0400

    clutter-id-pool: fix warning on bad pick
    
    Commit 13ac1fe7 purported to extend the _clutter_id_pool_lookup()
    warning to the case where the id referred to a deleted actor, but did
    not actually do so, because _clutter_id_pool_remove() set deleted IDs
    to 0xdecafbad, not NULL. Fix this.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=650597

 clutter/clutter-id-pool.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/clutter/clutter-id-pool.c b/clutter/clutter-id-pool.c
index 9978cb0..bd224f3 100644
--- a/clutter/clutter-id-pool.c
+++ b/clutter/clutter-id-pool.c
@@ -101,8 +101,7 @@ _clutter_id_pool_remove (ClutterIDPool *id_pool,
 
   array = (void*) id_pool->array->data;
 
-  /* set pointer to a recognizably voided value */
-  array[id_] = (void*)0xdecafbad;
+  array[id_] = NULL;
 
   id_pool->free_ids = g_slist_prepend (id_pool->free_ids,
                                        GUINT_TO_POINTER (id_));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]