From a62d05f2c61d5aa8a0d6a34c041b951bbfe446c1 Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Tue, 29 May 2018 13:41:07 +0200 Subject: [PATCH] coalesce.c: use isl_bool enums instead of plain integers This improves readability of the code and helps bug-finding tools [1], which warn on integer to enum conversions in C. Such conversions, despite being valid C, often cause bugs in C code. [1] https://noamlewis.wordpress.com/2017/10/05/type-safe-enums-in-c-using-a-clang-plugin/) Signed-off-by: Tobias Grosser Signed-off-by: Sven Verdoolaege --- isl_coalesce.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/isl_coalesce.c b/isl_coalesce.c index 7ad8548e..01fc7cdb 100644 --- a/isl_coalesce.c +++ b/isl_coalesce.c @@ -2703,9 +2703,9 @@ static isl_bool same_divs(__isl_keep isl_basic_map *bmap1, total = isl_basic_map_total_dim(bmap1); for (i = 0; i < bmap1->n_div; ++i) if (!isl_seq_eq(bmap1->div[i], bmap2->div[i], 2 + total)) - return 0; + return isl_bool_false; - return 1; + return isl_bool_true; } /* Assuming that "tab" contains the equality constraints and -- 2.11.4.GIT