elm: enhance eina_list_free usages. use EINA_LIST_FREE if needed.
This commit is contained in:
parent
b347b94e19
commit
ba4dbce9d9
|
@ -1573,8 +1573,7 @@ _round_enabled_set(Eo *obj, void *_pd, va_list *list)
|
|||
|
||||
_blank_item_check(obj, sd->display_item_num);
|
||||
|
||||
eina_list_free(sd->r_items);
|
||||
sd->r_items = NULL;
|
||||
sd->r_items = eina_list_free(sd->r_items);
|
||||
}
|
||||
|
||||
if (sd->selected_item) _selected_item_indicate(sd->selected_item);
|
||||
|
|
|
@ -1417,7 +1417,6 @@ _tap_gestures_test_reset(Gesture_Info *gesture)
|
|||
static void
|
||||
_n_long_tap_test_reset(Gesture_Info *gesture)
|
||||
{
|
||||
Eina_List *l;
|
||||
Pointer_Event *p;
|
||||
Long_Tap_Type *st;
|
||||
|
||||
|
@ -1426,10 +1425,10 @@ _n_long_tap_test_reset(Gesture_Info *gesture)
|
|||
|
||||
st = gesture->data;
|
||||
|
||||
EINA_LIST_FOREACH(st->touched, l, p)
|
||||
EINA_LIST_FREE(st->touched, p)
|
||||
free(p);
|
||||
st->touched = NULL;
|
||||
|
||||
eina_list_free(st->touched);
|
||||
if (st->timeout)
|
||||
{
|
||||
ecore_timer_del(st->timeout);
|
||||
|
@ -1460,21 +1459,16 @@ _line_data_reset(Line_Data *st)
|
|||
static void
|
||||
_line_test_reset(Gesture_Info *gesture)
|
||||
{
|
||||
Eina_List *l;
|
||||
Line_Type *st;
|
||||
Eina_List *list;
|
||||
Line_Data *t_line;
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN(gesture);
|
||||
if (!gesture->data) return;
|
||||
|
||||
st = gesture->data;
|
||||
list = st->list;
|
||||
|
||||
EINA_LIST_FOREACH(list, l, t_line)
|
||||
EINA_LIST_FREE(st->list, t_line)
|
||||
free(t_line);
|
||||
|
||||
eina_list_free(list);
|
||||
st->list = NULL;
|
||||
}
|
||||
|
||||
|
@ -3623,7 +3617,7 @@ _elm_gesture_layer_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
|
|||
int i;
|
||||
|
||||
_event_history_clear(obj);
|
||||
eina_list_free(sd->pending);
|
||||
sd->pending = eina_list_free(sd->pending);
|
||||
|
||||
EINA_LIST_FREE(sd->touched, data)
|
||||
free(data);
|
||||
|
|
|
@ -1685,7 +1685,7 @@ _elm_list_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
|
|||
if (sd->to_delete)
|
||||
ERR("ERROR: leaking nodes!\n");
|
||||
|
||||
eina_list_free(sd->selected);
|
||||
sd->selected = eina_list_free(sd->selected);
|
||||
|
||||
eo_do_super(obj, MY_CLASS, evas_obj_smart_del());
|
||||
}
|
||||
|
@ -2010,8 +2010,7 @@ _clear(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
|
|||
|
||||
if (!sd->items) return;
|
||||
|
||||
eina_list_free(sd->selected);
|
||||
sd->selected = NULL;
|
||||
sd->selected = eina_list_free(sd->selected);
|
||||
|
||||
if (sd->walking > 0)
|
||||
{
|
||||
|
|
|
@ -2572,8 +2572,7 @@ _overlay_place(Elm_Map_Smart_Data *sd)
|
|||
Eina_List *l, *ll;
|
||||
Elm_Map_Overlay *overlay;
|
||||
|
||||
eina_list_free(sd->group_overlays);
|
||||
sd->group_overlays = NULL;
|
||||
sd->group_overlays = eina_list_free(sd->group_overlays);
|
||||
|
||||
EINA_LIST_FOREACH(sd->overlays, l, overlay)
|
||||
{
|
||||
|
@ -5311,8 +5310,7 @@ _overlays_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
|
|||
|
||||
Elm_Map_Smart_Data *sd = _pd;
|
||||
|
||||
eina_list_free(sd->all_overlays);
|
||||
sd->all_overlays = NULL;
|
||||
sd->all_overlays = eina_list_free(sd->all_overlays);
|
||||
|
||||
EINA_LIST_FOREACH(sd->overlays, l, ovl)
|
||||
sd->all_overlays = eina_list_append(sd->all_overlays, ovl);
|
||||
|
|
|
@ -3387,8 +3387,7 @@ error_state_add:
|
|||
eina_stringshare_del(item->label);
|
||||
eina_stringshare_del(item->icon_str);
|
||||
free(eina_list_data_get(item->states));
|
||||
eina_list_free(item->states);
|
||||
item->states = NULL;
|
||||
item->states = eina_list_free(item->states);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -3427,8 +3426,7 @@ elm_toolbar_item_state_del(Elm_Object_Item *it,
|
|||
eina_stringshare_del(it_state->label);
|
||||
eina_stringshare_del(it_state->icon_str);
|
||||
free(eina_list_data_get(item->states));
|
||||
eina_list_free(item->states);
|
||||
item->states = NULL;
|
||||
item->states = eina_list_free(item->states);
|
||||
}
|
||||
|
||||
return EINA_TRUE;
|
||||
|
|
Loading…
Reference in New Issue