[vlc-commits] tdestroy: use assert()
Rémi Denis-Courmont
git at videolan.org
Tue Jan 31 17:59:57 CET 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jan 31 18:59:36 2012 +0200| [2b268061a42125e7ce79d63e42ce0cc2dd9c720c] | committer: Rémi Denis-Courmont
tdestroy: use assert()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2b268061a42125e7ce79d63e42ce0cc2dd9c720c
---
src/extras/tdestroy.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/extras/tdestroy.c b/src/extras/tdestroy.c
index 9d3deab..ea199b8 100644
--- a/src/extras/tdestroy.c
+++ b/src/extras/tdestroy.c
@@ -93,9 +93,11 @@ void vlc_tdestroy (void *root, void (*freenode) (void *))
vlc_mutex_lock (&smallest.lock);
for (size_t i = 0; i < count; i++)
{
- smallest.node = tab[i];
- if (tdelete (smallest.node, &root, cmp_smallest) == NULL)
- abort ();
+ void *node = tab[i];
+
+ smallest.node = node;
+ node = tdelete (node, &root, cmp_smallest);
+ assert (node != NULL);
}
vlc_mutex_unlock (&smallest.lock);
assert (root == NULL);
More information about the vlc-commits
mailing list