seoz pushed a commit to branch master.
commit c0ad7cc846ff49bdf9f25594461afd0bfa66b407
Author: Ryuan Choi <[email protected]>
Date: Wed Apr 17 14:35:34 2013 +0900
elm_index.c: Fixed warnings when closed elementary_test "Index horizontal".
In _elm_index_smart_del, _item_free was called twice.
So this patch removed unnecessary _item_free() which called by
elm_widget_item_del.
---
src/lib/elm_index.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/src/lib/elm_index.c b/src/lib/elm_index.c
index 54cc948..ba1daf1 100644
--- a/src/lib/elm_index.c
+++ b/src/lib/elm_index.c
@@ -48,7 +48,10 @@ _item_free(Elm_Index_Item *it)
it->omitted = eina_list_free(it->omitted);
if (it->letter)
- eina_stringshare_del(it->letter);
+ {
+ eina_stringshare_del(it->letter);
+ it->letter = NULL;
+ }
}
static void
@@ -974,17 +977,12 @@ _elm_index_smart_add(Eo *obj, void *_pd, va_list *list
EINA_UNUSED)
static void
_elm_index_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
{
- Elm_Index_Item *it;
Elm_Index_Omit *o;
Elm_Index_Smart_Data *sd = _pd;
while (sd->items)
- {
- it = sd->items->data;
- _item_free(it);
- elm_widget_item_del(it);
- }
+ elm_widget_item_del(sd->items->data);
EINA_LIST_FREE(sd->omit, o)
free(o);
@@ -1502,7 +1500,6 @@ _item_sorted_insert(Eo *obj, void *_pd, va_list *list)
Elm_Index_Item *p_it = eina_list_data_get(lnear);
if (cmp_data_func(p_it->base.data, it->base.data) >= 0)
p_it->base.data = it->base.data;
- _item_free(it);
elm_widget_item_del(it);
it = NULL;
}
@@ -1555,10 +1552,7 @@ _item_clear(Eo *obj, void *_pd, va_list *list
EINA_UNUSED)
clear = eina_list_append(clear, it);
}
EINA_LIST_FREE(clear, it)
- {
- _item_free(it);
- elm_widget_item_del(it);
- }
+ elm_widget_item_del(it);
}
EAPI void
--
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter