seoz pushed a commit to branch master.

commit 636ae57e044ffab738481ed2d18956ce26273910
Author: Daniel Juyung Seo <[email protected]>
Date:   Wed May 29 20:57:58 2013 +0900

    elm_index.c: ELM_SAFE_FREE adoption.
    
    I splited ELM_SAFE_FREE refactoring patches. One commit per each file as 
recommended.
    For the detail, please refer 3072dab12f12fe83fb5a628d15efd5cded11787f.
---
 src/lib/elm_index.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/lib/elm_index.c b/src/lib/elm_index.c
index 879f32b..fb3efa2 100644
--- a/src/lib/elm_index.c
+++ b/src/lib/elm_index.c
@@ -52,11 +52,7 @@ _item_free(Elm_Index_Item *it)
    if (it->omitted)
      it->omitted = eina_list_free(it->omitted);
 
-   if (it->letter)
-     {
-        eina_stringshare_del(it->letter);
-        it->letter = NULL;
-     }
+   ELM_SAFE_FREE(it->letter, eina_stringshare_del);
 }
 
 static void
@@ -651,7 +647,7 @@ _sel_eval(Evas_Object *obj,
                   else
                     evas_object_smart_callback_call
                        (obj, SIG_CHANGED, it);
-                  ELM_FREE_FUNC(sd->delay, ecore_timer_del);
+                  if (sd->delay) ecore_timer_del(sd->delay);
                   sd->delay = ecore_timer_add(sd->delay_change_time,
                                               _delay_change_cb, obj);
                }
@@ -996,7 +992,7 @@ _elm_index_smart_del(Eo *obj, void *_pd, va_list *list 
EINA_UNUSED)
    EINA_LIST_FREE(sd->omit, o)
      free(o);
 
-   ELM_FREE_FUNC(sd->delay, ecore_timer_del);
+   if (sd->delay) ecore_timer_del(sd->delay);
 
    eo_do_super(obj, MY_CLASS, evas_obj_smart_del());
 }
@@ -1245,7 +1241,7 @@ elm_index_item_selected_set(Elm_Object_Item *it,
            (obj, SIG_CHANGED, it);
         evas_object_smart_callback_call
            (obj, SIG_SELECTED, it);
-        ELM_FREE_FUNC(sd->delay, ecore_timer_del);
+        if (sd->delay) ecore_timer_del(sd->delay);
         sd->delay = ecore_timer_add(sd->delay_change_time,
                                     _delay_change_cb, obj);
      }

-- 

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1

Reply via email to