]> git.sesse.net Git - vlc/blobdiff - src/extras/tdestroy.c
Check for SSSE3 at build time if possible
[vlc] / src / extras / tdestroy.c
index d1a65c58c23ba80500e548a1ccb1d82e9f88e9b6..ea199b8d3d6ce7994cb2799df33ac961942b954e 100644 (file)
@@ -5,19 +5,19 @@
 /*****************************************************************************
  * Copyright (C) 2009 RĂ©mi Denis-Courmont
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
  * the Free Software Foundation; either version 2.1 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifdef HAVE_CONFIG_H
@@ -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);