summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2009-02-25 10:46:14 +0000
committerCedric BAIL <cedric.bail@free.fr>2009-02-25 10:46:14 +0000
commite31b5e961eff9b2c8d5c6a5419502d391e12ca00 (patch)
treeee1dcbf416202d90c9ba9824234ea56d98166e93
parente6065f6c1ce9e00d8ba8671f85093456be8170fa (diff)
* eina/src/lib/eina_list.c: Use less code.
* eina/src/lib/eina_error.c: Add a way to abord on any error message. SVN revision: 39196
Diffstat (limited to '')
-rw-r--r--legacy/eina/src/lib/eina_error.c2
-rw-r--r--legacy/eina/src/lib/eina_list.c11
2 files changed, 4 insertions, 9 deletions
diff --git a/legacy/eina/src/lib/eina_error.c b/legacy/eina/src/lib/eina_error.c
index 7ab0e452b4..5e32d0040a 100644
--- a/legacy/eina/src/lib/eina_error.c
+++ b/legacy/eina/src/lib/eina_error.c
@@ -696,6 +696,8 @@ EAPI void eina_error_print(Eina_Error_Level level, const char *file,
696 va_start(args, fmt); 696 va_start(args, fmt);
697 _print_cb(level, file, fnc, line, fmt, _print_cb_data, args); 697 _print_cb(level, file, fnc, line, fmt, _print_cb_data, args);
698 va_end(args); 698 va_end(args);
699
700 if (getenv("EINA_ERROR_ABORT")) abort();
699} 701}
700 702
701/** 703/**
diff --git a/legacy/eina/src/lib/eina_list.c b/legacy/eina/src/lib/eina_list.c
index f1ccaf2041..3629b09b9f 100644
--- a/legacy/eina/src/lib/eina_list.c
+++ b/legacy/eina/src/lib/eina_list.c
@@ -816,17 +816,11 @@ EAPI Eina_List *
816eina_list_remove(Eina_List *list, const void *data) 816eina_list_remove(Eina_List *list, const void *data)
817{ 817{
818 Eina_List *l; 818 Eina_List *l;
819 void *list_data;
820 819
821 if (list) EINA_MAGIC_CHECK_LIST(list); 820 if (list) EINA_MAGIC_CHECK_LIST(list);
822 821
823 EINA_LIST_FOREACH(list, l, list_data) 822 l = eina_list_data_find_list(list, data);
824 {
825 if (list_data == data)
826 return eina_list_remove_list(list, l); 823 return eina_list_remove_list(list, l);
827 }
828
829 return list;
830} 824}
831 825
832/** 826/**
@@ -878,12 +872,11 @@ eina_list_remove_list(Eina_List *list, Eina_List *remove_list)
878 } 872 }
879 else 873 else
880 return_l = remove_list->next; 874 return_l = remove_list->next;
881 if (remove_list == list->accounting->last) 875 if (remove_list == remove_list->accounting->last)
882 { 876 {
883 EINA_MAGIC_CHECK_LIST(list); 877 EINA_MAGIC_CHECK_LIST(list);
884 list->accounting->last = remove_list->prev; 878 list->accounting->last = remove_list->prev;
885 } 879 }
886
887 _eina_list_mempool_list_free(remove_list); 880 _eina_list_mempool_list_free(remove_list);
888 return return_l; 881 return return_l;
889} 882}