projects
/
profile
/
ivi
/
eina.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6cabe35
)
one more safety check: do not remove element if it's not in any list.
author
barbieri
<barbieri>
Tue, 14 Jul 2009 14:00:59 +0000
(14:00 +0000)
committer
barbieri
<barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 14 Jul 2009 14:00:59 +0000
(14:00 +0000)
This is the best we can do, but what should be done is to check if
element is really from that list.
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eina@41326
7cbeb6ba
-43b4-40fd-8cce-
4c39aea84d33
src/lib/eina_inlist.c
patch
|
blob
|
history
diff --git
a/src/lib/eina_inlist.c
b/src/lib/eina_inlist.c
index
c9fd58f
..
488b3e0
100644
(file)
--- a/
src/lib/eina_inlist.c
+++ b/
src/lib/eina_inlist.c
@@
-251,6
+251,8
@@
eina_inlist_remove(Eina_Inlist *list, Eina_Inlist *item)
/* checkme */
EINA_SAFETY_ON_NULL_RETURN_VAL(list, NULL);
EINA_SAFETY_ON_NULL_RETURN_VAL(item, list);
+ EINA_SAFETY_ON_TRUE_RETURN_VAL
+ ((item != list) && (item->prev == NULL) && (item->next == NULL), list);
if (item->next)
item->next->prev = item->prev;