util/rb_tree: Replace useless ifs with asserts

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Jason Ekstrand
2019-09-23 12:24:12 -05:00
parent a733423da5
commit 03911195a3

View 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 * show up in the list in order of insertion. We insert them
* in the order they are in in the array. * in the order they are in in the array.
*/ */
if (prev == NULL || prev < n); assert(prev == NULL || prev < n);
} }
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 * show up in the list in order of insertion. We insert them
* in the order they are in in the array. * in the order they are in in the array.
*/ */
if (prev == NULL || prev > n); assert(prev == NULL || prev > n);
} }
prev = n; prev = n;