projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a733423
)
util/rb_tree: Replace useless ifs with asserts
author
Jason Ekstrand
<jason@jlekstrand.net>
Mon, 23 Sep 2019 17:24:12 +0000
(12:24 -0500)
committer
Jason Ekstrand
<jason@jlekstrand.net>
Mon, 23 Sep 2019 22:38:30 +0000
(22:38 +0000)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/util/rb_tree_test.c
patch
|
blob
|
history
diff --git
a/src/util/rb_tree_test.c
b/src/util/rb_tree_test.c
index a5952b3b52db141e4b254056efc046ecee88954e..20a236d2eec2bcee54f6d46a953fd9b4bf4864a8 100644
(file)
--- a/
src/util/rb_tree_test.c
+++ b/
src/util/rb_tree_test.c
@@
-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;