util/rb_tree: Replace useless ifs with asserts
[mesa.git] / src / util / rb_tree_test.c
index a5952b3b52db141e4b254056efc046ecee88954e..20a236d2eec2bcee54f6d46a953fd9b4bf4864a8 100644 (file)
@@ -84,7 +84,7 @@ validate_tree_order(struct rb_tree *tree, unsigned expected_count)
              * show up in the list in order of insertion.  We insert them
              * in the order they are in in the array.
              */
-            if (prev == NULL || prev < n);
+            assert(prev == NULL || prev < n);
         }
 
         prev = n;
@@ -105,7 +105,7 @@ validate_tree_order(struct rb_tree *tree, unsigned expected_count)
              * show up in the list in order of insertion.  We insert them
              * in the order they are in in the array.
              */
-            if (prev == NULL || prev > n);
+            assert(prev == NULL || prev > n);
         }
 
         prev = n;