From: Jason Ekstrand Date: Mon, 23 Sep 2019 17:24:12 +0000 (-0500) Subject: util/rb_tree: Replace useless ifs with asserts X-Git-Tag: upstream/19.3.0~1694 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=03911195a32e9c00b07de2c5cdc6a4a70ae2284b;p=platform%2Fupstream%2Fmesa.git util/rb_tree: Replace useless ifs with asserts Reviewed-by: Ian Romanick --- diff --git a/src/util/rb_tree_test.c b/src/util/rb_tree_test.c index a5952b3..20a236d 100644 --- 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;